Changeset 16
- Timestamp:
- Feb 19, 2014, 11:22:13 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r15 r16 94 94 RedrawPending := False; 95 95 PaintBox1.Repaint; 96 Caption := Game.CurrentPlayer.Name + ' - xTactics';96 Caption := Game.CurrentPlayer.Name + ' - turn ' + IntToStr(Game.TurnCounter) + ' - xTactics'; 97 97 end; 98 98 end; … … 131 131 Game.NextTurn; 132 132 Redraw; 133 while Game.CurrentPlayer.Mode <> pmHuman do begin 134 Game.NextTurn; 135 Redraw; 136 end; 133 137 end; 134 138 -
trunk/UGame.pas
r15 r16 105 105 CurrentPlayer: TPlayer; 106 106 Moves: TObjectList; // TList<TMove> 107 TurnCounter: Integer; 107 108 procedure NextTurn; 108 109 constructor Create; … … 314 315 Map.Grow(CurrentPlayer); 315 316 CurrentPlayer := TPlayer(Players[(Players.IndexOf(CurrentPlayer) + 1) mod Players.Count]); 317 if Players.IndexOf(CurrentPlayer) = 0 then Inc(TurnCounter); 316 318 end; 317 319 … … 330 332 Player.Game := Self; 331 333 Player.Color := clRed; 334 Player.Mode := pmComputer; 332 335 Players.Add(Player); 333 336 … … 355 358 StartCell: TCell; 356 359 begin 360 TurnCounter := 1; 357 361 Moves.Clear; 358 362 Map.ClearCellMoves; … … 363 367 else Terrain := ttNormal; 364 368 Power := Random(4); 369 Player := nil; 365 370 end; 366 371 for I := 0 to Players.Count - 1 do
Note:
See TracChangeset
for help on using the changeset viewer.