Readme url: Readme The spec document: Demand
Apply the knowledge learned form the course of data structure and implement a competitive algorithm for the Critical Mass game.
- $g++ chain_reaction.cpp board.cpp rules.cpp player.cpp algorithm_ST.cpp algorithm_TA.cpp
- OS: Fresh Ubuntu 16.04.
- The main data flow is in the chain_reaction.cpp.
- The following three lines of code are used to declare the variable board, red player and blue player.
- Firstly, the program will call your function which "should" return a board index (i, j).
- Then the program will call place_orb function to put your orb on the index that obtained from your algorithm.
- If a players' placement is illegal, the program will terminate immediately and annouce the winner.
- If a players' last placement dominate the hole board, the program will terminate immediately and annouce the winner.
- The algorithm_ST.cpp file is where you need to impliment your algorithm.
- All the constrains and support funcitons is commented in the file, please check the algorithm_ST.cpp for more information.
- All you need to do is complete the algorithm_ST.cpp with correct return format.
- Any other modifies "will not" be compiled in TA's computer.(except algorithm_ST.cpp)
- But we do not restrict you from modifying any part of the framwork. You can do whatever you want to speed up your developement.