Revision e7e05ad...

Go back to digest for 1st December 2013

Bug Fixes in Games

Jaime Torres Amate committed changes in [knavalbattle] /ai:

always return a valid move to avoid the game freeze

When Controller::finalizeShot receives an Illegal move, it just does
not know what to do next, and the game freeze.
This patch implements the last option to return a valid move, searching
for a free cell one by one, therefore it becomes impossible to return
an Illegal move because or the computer wins or the opponen wins before
the board is empty of free cells.

Another solution for dummyAI could be to implement a list of
free cells and choose on them randomly.

REVIEW: 113854

File Changes

Modified 4 files
  • /ai
  •   src.cpp
  •   src.h
  •   src/dummyai.cpp
  •   src/smartai.cpp
4 files changed in total