Implement PSynthesisPP as A Computer Game In Java
Implement PSynthesisPP as A Computer Game In Java
项目类别:计算机
Hello, dear friend, you can consult us at any time if you have any questions, add  WeChat:  zz-x2580

Implementation

Implement PSynthesisPP (see game rules) as a computer game in Java.

 

  1. general
  2. All classes and interfaces belong to a package starting with psynthesispp.
  3. The given classes and interfaces of the package preset may not be changed.

However, it is allowed to extend the following classes directly (for more information see the corresponding section of the project description).

Viewer           May be extended with additional functions. Existing functions must not be changed.

ArgumentParser          May be extended by further parameters.

Extension by inheritance is allowed for all classes, enumerations and interfaces of the package psynthesispp.preset.

Methods of the player classes (see Player and Main Program) may only use instances of exactly the classes from psynthesispp.preset as arguments and return values. Therefore, if you want to extend Move, Hexagon, etc., you should not use inheritance but embedding these classes in wrapper or container classes.

  1. Comment the source code in detail. Use JavaDoc for the Application Programming Interface (API) and comment as usual.
  2. Use Ant to automatically compile the program and create the documentation. 
  1. game board

Create a game board class with the following features.

List entry with index 0 determines the number of seeds, entry with index 1 ≤ i ≤ k determines the number of trees of size i to be activated. The list does not have to contain k + 1 elements, for non-existing element the value 0 is assumed.

  1. h) The interface preset.Viewable is implemented.
  1. input and output
  2. a) Create a class that implements the preset.Viewer interface.

This class should allow to get all the information needed to view a game board object without allowing access to the attributes of the game board object.

The viewer() method of the game board returns a matching object of this class. For this reason, the game board class must contain all the necessary functionality to implement the functions of the psynthesispp.preset.Viewer interface.

  1. b) Create a text input class that implements the preset.Requestable interface.

The method request(MoveType) requests a move, in one line, from standard input and returns a matching psynthesispp.preset.Move-object.

Use the static method parse(String, MoveType) of the Move class to convert the string read in from standard input into a Move object.

The method parse throws a psynthesispp.preset.MoveFormatException if the read-in fails. This exception must be responded to in a meaningful way.

  1. c) Design an interface for the output of the board. Use the preset.Viewer interface to pass information about the game board to the displaying class.
  2. d) Create a graphical input/output class. This class implements thepreset.Requestable interfaces and the output interface you wrote, and uses an object of a class that implements the psynthesispp.preset.Viewer interface for simple graphical output.

Make sure that the display of the game board, active and passive supplies, etc. is adapted to the size of the window and scales along when the window is resized. All information about the state of the game must be the graphical output (e.g. winner at the end of the game).

留学ICU™️ 留学生辅助指导品牌
在线客服 7*24 全天为您提供咨询服务
咨询电话(全球): +86 17530857517
客服QQ:2405269519
微信咨询:zz-x2580
关于我们
微信订阅号
© 2012-2021 ABC网站 站点地图:Google Sitemap | 服务条款 | 隐私政策
提示:ABC网站所开展服务及提供的文稿基于客户所提供资料,客户可用于研究目的等方面,本机构不鼓励、不提倡任何学术欺诈行为。