r*e
2 楼
1. Design a Chess board game OOP , walk through the class and function
2. Design a file System
有沒有大牛 walk through 思路??
2. Design a file System
有沒有大牛 walk through 思路??
L*1
3 楼
发包子攒rp吧
d*x
4 楼
1.
Piece is a general interface, which can be implemented as concrete types,
interface may include possible moves given the settings on board (arguable);
getter for name; getter for display configuration (arguable); color...
Board will store and manage positions of all Pieces. Sierialization may be
required since users could save and resume games. Board provides methods to
move, change, remove, add (for undo) pieces by name/reference/position/
enumeration.
Use patterns like builder pattern to generate a board setting.
Players class will store basic information about time remaining, history win
/lose data, and color assigned.
Then GameController. Though I believe most of the logics should go here, I
personally tend to put basic movement logics in Piece. This Controller
should include high level game logics and rules, like: receive Commands to
select piece, return positions that Piece can be moved to (considering 王车
换位 and 吃过路兵...), Commands to actually move a Piece to desired position
, promotion of piece class, time counting, win/lose condition, forbidden
rules (if any), provides information about current player. Also, interfaces
to board settings..
And since we are using Command pattern, we will have the ability to redo/
undo.
Then the UI, making use of the GameController, it renders the current board
setting, accept Player's selection of pieces in current player's color, then
accepts legal movements, functions to undo/redo, poll (arguable) the player
's remaining time, check win/lose criteria after each move (arguable, i
prefer listeners or callbacks actually)....and so on
just my 2 cents.
【在 r*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 1. Design a Chess board game OOP , walk through the class and function
: 2. Design a file System
: 有沒有大牛 walk through 思路??
Piece is a general interface, which can be implemented as concrete types,
interface may include possible moves given the settings on board (arguable);
getter for name; getter for display configuration (arguable); color...
Board will store and manage positions of all Pieces. Sierialization may be
required since users could save and resume games. Board provides methods to
move, change, remove, add (for undo) pieces by name/reference/position/
enumeration.
Use patterns like builder pattern to generate a board setting.
Players class will store basic information about time remaining, history win
/lose data, and color assigned.
Then GameController. Though I believe most of the logics should go here, I
personally tend to put basic movement logics in Piece. This Controller
should include high level game logics and rules, like: receive Commands to
select piece, return positions that Piece can be moved to (considering 王车
换位 and 吃过路兵...), Commands to actually move a Piece to desired position
, promotion of piece class, time counting, win/lose condition, forbidden
rules (if any), provides information about current player. Also, interfaces
to board settings..
And since we are using Command pattern, we will have the ability to redo/
undo.
Then the UI, making use of the GameController, it renders the current board
setting, accept Player's selection of pieces in current player's color, then
accepts legal movements, functions to undo/redo, poll (arguable) the player
's remaining time, check win/lose criteria after each move (arguable, i
prefer listeners or callbacks actually)....and so on
just my 2 cents.
【在 r*****e 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 1. Design a Chess board game OOP , walk through the class and function
: 2. Design a file System
: 有沒有大牛 walk through 思路??
d*x
6 楼
吃过路兵可能需要一些额外的work...傻傻装不知道好了。。
);
win
【在 d**********x 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 1.
: Piece is a general interface, which can be implemented as concrete types,
: interface may include possible moves given the settings on board (arguable);
: getter for name; getter for display configuration (arguable); color...
: Board will store and manage positions of all Pieces. Sierialization may be
: required since users could save and resume games. Board provides methods to
: move, change, remove, add (for undo) pieces by name/reference/position/
: enumeration.
: Use patterns like builder pattern to generate a board setting.
: Players class will store basic information about time remaining, history win
);
win
【在 d**********x 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 1.
: Piece is a general interface, which can be implemented as concrete types,
: interface may include possible moves given the settings on board (arguable);
: getter for name; getter for display configuration (arguable); color...
: Board will store and manage positions of all Pieces. Sierialization may be
: required since users could save and resume games. Board provides methods to
: move, change, remove, add (for undo) pieces by name/reference/position/
: enumeration.
: Use patterns like builder pattern to generate a board setting.
: Players class will store basic information about time remaining, history win
M*7
7 楼
mark
z*2
8 楼
mark
v*n
9 楼
mark
相关阅读
北京天线工作G 家onsite前会给面试官名单表吗?storage management system的码农有前途么?请问h1b 延期问题H1B的一个问题,包子答谢ICC能提供兼职工作么?该问一下公司h1b进展吗?悲摧呀,面试官如是说推荐cap-H1B律师换雇主申请H1B跟我OPT有gap怎么办??报一个 offer (转载)现在的market是逼着老员工跳槽啊Amazon约好的电面 到时间了居然没有打来 怎么回事?练了这么久coding 突然觉得伤感献上最近两家onsite面经(长!)上周有个onsite,今天收到信background check[合集] 郑重建议有别的Offer的不要去EPIC了[合集] 是我人品差还是现在的小孩不懂规矩报一个MS SDE2的offer关于背景调查!求问