EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考




您的位置: 主页 > 编程案例 > 数据结构代写 >
代做数据结构:编程作业CS计算机科学代写代码题目:加农炮游戏Forsyth–Edwards Notation - 数据结构代做
发布时间:2021-07-25 13:54:50浏览次数:
First the field a9 is given, finally the field j0. The information is in rows.Empty rows also remain empty in the FEN string. The game board at the beginning will be likefollows:/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w///b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/或者/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w/1111111111/1234/b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/Game statusTo describe the game state, the description of the boardto show which player is currently at the turn. At the beginning (white starts) is:/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w///b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/After placing the cities as in the example, the game board would look like this:4W5/1w1w1w1w1w/1w1w1w1w1w/1w1w1w1w1w///b1b1b1b1b1/b1b1b1b1b1/b1b1b1b1b1/7B2Canon士兵可以组成一个加农炮火车(如何组成见规则),描述方式为从起始士兵到尾部士兵,如a1-b2开火When firing with a cannon, 声明尾部的士兵和要开火的地点(for example, 输入a1-a5, if there is a canon on a1, a2, a3, and an enemy soldier on a5).移动When moving a cannon, 声明要移动的士兵和要移动到的地点(eg, a1-a4, if there is a canon on a1, a2, a3 and a4 is free).放置城市 可以用如下方式声明The placement of a city is by a train with the same start andTarget coordination indicated (so for example d0-d0, if black siteis at the beginning of hisCity placed on d0).黑方执子时,d0-d0就是声明黑方把城市放在了d0的位置上。Game server for Cannon in JavaMost of the game server has already been implemented. In addition, the GUI and communication is already there. The task now is to develop a data model in the already started class CannonGame for the concrete game Cannon, with which the state of the game can be described. This is to implement the function tryMove (format of a move, see Cannon notation), which checks if a move is valid and executes it if possible. In addition, two functions have to be implemented with which a game state (board with FEN string, see section Cannon notation) can be transferred or called up. Normally, a new CannonGame must start with the start state (see Cannon rules). All code that you have inserted will be tested automatically with jUnit tests. Branch coverage (at bytecode level) should be achieved. However, the test object is the specification, that is, if functional content is missing, the test cases are also not complete. The test trap must pass successfully. After implementing the functionality and the test trap, you may need to apply suitable refactorings. The code you are developing must meet the following metrics: