Skip to content

Commit d644648

Browse files
committed
Revert logic
1 parent 11fc262 commit d644648

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

socha-logic/Logic.cs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,7 @@ public override Move GetMove()
1818
{
1919
// TODO: Add your game logic
2020

21-
var possibleMoves = GameState.GetPossibleMoves();
22-
23-
var bestScore = -9999; Move bestMove = null;
24-
foreach (var possibleMove in possibleMoves.Take(200))
25-
{
26-
Console.WriteLine($"Handling move {possibleMove}");
27-
State futureState = null;
28-
try
29-
{
30-
futureState = possibleMove.PerformOn(GameState);
31-
}
32-
catch
33-
{
34-
continue;
35-
}
36-
37-
var curScore = futureState.MyselfPlayer.Ship.Pos.q;
38-
if (curScore > bestScore)
39-
{
40-
bestScore = curScore;
41-
bestMove = possibleMove;
42-
}
43-
}
44-
45-
if (bestMove == null)
46-
GetHashCode();
47-
48-
return bestMove ?? possibleMoves.First();
21+
return GameState.GetPossibleMoves().First();
4922
}
5023
}
5124
}

0 commit comments

Comments
 (0)