首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
GitLab程序讲解、辅导Python,C++,Java编程语言 辅导R语言编程|解析C/C++编程
项目预算:
开发周期:
发布时间:
要求地区:
Project “Amazons”
Game instruction
1. This is an extended version of board game "The Amazons"
2. The game is played on chess-like board, but the size of the board is not fixed. Moreover, there
can be treasure or some artifact on each field of the board. The game can be played by one, two
or more players. Each player has a given number of amazons.
3. The game starts with the setting phase played in turns. In a single turn the current player places
one of his amazons on an unoccupied field. Then, the next player does the same. This steps are
repeated until all amazons are placed. Players do not get treasures of artefacts during that phase,
however the treasure and artifacts are removed from the used fields.
4. Game is played in turns. In his turn the player moves one of his amazons one or more fields in a
straight line horizontally, vertically or diagonally. Then, the moved amazon shoots an arrow in
a straight line horizontally, vertically or diagonally at least at distance of one field. Neither
amazon nor the arrow can cross or enter a field with an obstacle, that is, another amazon, landed
arrow or spear.
5. When the player cannot make a valid move then his turn is skipped. Game ends when all
players have no valid move.
6. After moving the amazon, the player collects the treasure and the artifact from the field where
the amazon landed. The treasure can be worth from 1 to 5. The artifact must be used
immediately.
7. The winner is the player who gets the most treasure.
8. The artifacts are as follows:
a) a horse - the amazon immediately does the next move
b) a broken arrow - the amazon does NOT shoot an arrow after moving
c) a spear - instead of shooting an arrow, the amazon throws a spear; No obstacle blocks the
throw, so the spear can literally land on any field with no amazon or arrow and the field
becomes an obstacle, like in case of arrow. The spear can be moved only horizontally,
vertically or diagonally.
Your task
Your aim is to deliver a program that will play the game, either autonomously or interactively,
within the proposed procedure (see further in this text).
The text file format describing the state of the game
row 1 (board dimension): m n
rows 2 to m+1: n fields separated by single space, each field consists of 3 digits: first digit represents
the value of treasure (0-5), second digit represents an artifact (0-none, 1-horse, 2-broken
arrow, 3-spear), and third digit informs about occupation (0-tile is unoccupied, 1-8 ID of
the player, 9-arrow or spear). A combination of numbers 000 represents an unoccupied
field with no treasure and no artifact. In his turn the player modifies the field of departure
and field of arrival of the amazon as well the field destination of arrow (spear). If the last
digit is in the range 1-8, the first and the second digits should be 0.
row m+2 and consecutive: 3 fields separated by single spaces: first field is unique player name (string
no longer than 15 characters, without spaces, without quotation marks), second field is
player’s ID (number 1 to 8), third field shows the number of points collected so far from
treasure. If there is no row with player’s name (at the beginning of the game) player must
add a corresponding row at the end of the file, containing the name and setting consecutive
player’s number as the ID and initial points set to 0. Otherwise, the player should alter his
current score by the number of the collected points, and leave other fields unchanged.
Be aware that each line of the file may end with any number of spaces, try to prepare as much robust
program as you can.
Your program should accept command line parameters:
phase=phase_mark – phase_mark can take value placement or movement
amazons=N, where N is a number of amazons that player has; this parameter is only
specified if phase=placement;
inputboardfile – name of the file that contains current game state
outputboardfile – name of the file in which the new game state should be stored
name – request to display player’s name end exit the program.
iputboardfile and outputboardfile can be the same file (can have the same name)
Examples:
game.exe phase=placement amazons=3 inputboard.txt outpuboard.txt
game.exe phase=movement board.txt board.txt
game.exe name
If phase=placement, then the program is supposed to read the game state from the file, place one
amazon on the board, save the game state to the output file and exit. In total, the program cannot place
more than N amazons on the board (as defined by the amazons parameter). In such a case the
program exits immediately returning appropriate error code (see later).
If phase=movement, then the program is supposed to read the game state, move one of his amazon
and shoot an arrow, alter the score, save the game state and exit. If the move is not possible, the
program should exit immediately returning appropriate error code (see later).
If parameter name is used, then other parameters are ignored. Program should display only the player’s
name hidden (written directly) in the code. This option enables the game master to identify players.
Interactive game
The program should also be ready to be compiled for an interactive mode (use preprocessor directives
to choose the mode). In the interactive mode the program should allow to play interactive game
between two players sitting in front of the computer. The game state does not have to be stored in the
output file. The game state can be presented in a text mode (graphics mode is not compulsory).
Result returned by the program
Program should end in a controlled way, returning to the operating system one of the values (specified
as the argument of the return statement in the main function):
0 - program made the correct move
1 - program can not make any move (in the placement phase - all amazons have been placed; in the
movement phase – all amazons are blocked)
2 - error of the game state in the input file; in such a case additional error message should be
displayed identifying the cause and the position of the error in the input file
3 - internal program error, possibly with additional message
Additional issues: think how you can prevent cheating by your opponent.
Gameplay
Game is managed by game master, i.e. operating system script provided by Instructor. Script generates
the board (players do not create initial board), then players’ programs are run in a loop. For example,
let program1.exe, program2.exe and program3.exe be the programs provided by students 1, 2 and
3, then the script works according to the following pseudo-code:
generate_board.exe
while(true)
kod1 = program1.exe phase=placement amazons=3 board.txt board.txt
kod2 = program2.exe phase=placement amazons=3 board.txt board.txt
kod3 = program3.exe phase=placement amazons=3 board.txt board.txt
if (kod1 == 1 && kod2 == 1 && kod3 == 1) break;
}
while(true)
kod1 = program1.exe phase=movement board.txt board.txt
kod2 = program2.exe phase=movement board.txt board.txt
kod3 = program3.exe phase=movement board.txt board.txt
if (kod1 == 1 && kod2 == 1 && kod3 == 1) break;
}
Programs compiled for an interactive mode should allow a human player (instead of the computer) to
make a decision about next placement/move.
Teamwork
Project is made in groups consisting of 3-4 persons. Group members are selected by Instructor, you are
not supposed to change the membership. Teamwork supporting tools will be utilized, including GitLab.
It is group project, so consider choosing a project manager among team members to ease the workflow.
However, each student is expected to be able to explain any part of his/her
code. Contribution of each student must be clear and reflected in the source files as well as clearly
visible at GitLab.
Git repository
To ease the team work, the use of version control system is required. Git is one of the most popular
ones. It is required that each group creates its own git repository (git project). It allows both web based
and command line based access to projects. Use faculty gitlab server: https://gitlabstud.elka.pw.edu.pl/
Assessment (max 30 points)
1. Assessment of your progress made during T1-T5 (10 points, detailed scores provided in the
schedule below)
2. Final assessment and tournament during T6 (20 points)
a) Project structuring (division of the source code into files, function breakdown) (4 points)
b) Code quality (clarity, simplicity, comments, good naming convention, formatting,
appropriate data types and data structures) (5 points)
c) Testing (automated tests, documented manual tests) (4 points)
d) General impression (5 points)
e) Tournament result (2 points)
Extremely important remark: assessment is made individually (if the program is perfect, but your
contribution is low, you will get very few points; if quality of the code is high, but your part is weak,
you will get much less points than others; if your program is not fully functional, since one team
member failed in his tasks, you still can get maximum).
To trace your activity and see your contribution we will use GIT statistics. Activities not
registered at GIT or software not added to repo will be not taken into account.
Schedules (with points)
T0. Kick-off meeting, introduction to the challenge. Start working on flowcharts to sketch the general
concept (start with an interactive mode and then extend it for autonomous mode).
Everybody needs to deliver individual flowchart (or flowcharts) one day before T1.
T1. Discussion of submitted flowcharts (max 2 points).
Establishing the teams, preliminary discussion in teams. Agree on communication channels in the team.
Organize your work (GitLab required). Put chosen flowcharts to the repository.
T2. Present preliminary code for an interactive mode: main loop, interaction with user. Show it and run
it. (max 1 point)
T3. Present the structure of the project in terms of division into files and functions. Present declarations
of each function with comments describing arguments, results and purpose of the function. Create
issues on GitLab and assign team members to issues. (2 points)
T4. Present data structures for board, printing board on the screen. The user should be able to set the
amazons, make movement, but still it can be imperfect. (2 points)
T5. Handling the files, runtime arguments processing. Your program should read and write to file
according to the specification. It should interpret properly command line arguments. (3 points)
T6. Tournament, final assessment.
Each presentation cannot be longer than 8 minutes. Everything what is to be presented and to be
assessed must be pushed to GIT before the meeting (create folders with meaningful names). If you had
team meeting, then make a note and attendance list and put it on GIT. Alternatively, usage of individual
group channel on Teams is recommended. Let every team member say few words about their
contribution during last period. The main person to present the work you did can be chosen by the
lecturer.
The aim of the presentation is to get the feedback and make sure that the project is going well. You are
expected to be an active listener - remember, that you can find answers to your concerns or brilliant
ideas in other students' projects and use it in your project.
TIPS & TRICKS
1. Always keep the source code ready to be compiled - use commenting for that
2. Assign the tasks to everybody in the team, especially from T3, when you can work in parallel.
3. Don’t start with loading/saving files. You may do a lot of things having some constants in your
program and then you can replace them with data read from file.
4. It's better to have simple solution that will work than the most sophisticated algorithm but not
working. Try to work incrementally, be agile!
Q & A (To be filled in as questions arise)
1. Q: Does the amazon shoot an arrow twice in case of "horse" artifact?
A: Yes, shooting an arrow is a part of a move. So the amazon makes move, shoots an arrow,
collects an artifact (a horse), moves and shoots an arrow once again.
2. Q: Is our program expected to do the optimal moves, so it must have a kind of artificial
intelligent in it?
A: First, you should do the program that will follow all assumptions especially regarding
command line parameters and file format, but with the simplest possible intelligence. For
instance you may make decisions randomly. Then you may master you decision algorithm. Try
to put some reasonable rules, make some improvements. However, optimal decisions and very
sophisticated algorithm is not expected. You still may do it for your satisfaction, glory and
victory in the tournament, but notice, that amount of points for the winner is almost
insignificant.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
urba6006代写、java/c++编程语...
2024-12-26
代做program、代写python编程语...
2024-12-26
代写dts207tc、sql编程语言代做
2024-12-25
cs209a代做、java程序设计代写
2024-12-25
cs305程序代做、代写python程序...
2024-12-25
代写csc1001、代做python设计程...
2024-12-24
代写practice test preparatio...
2024-12-24
代写bre2031 – environmental...
2024-12-24
代写ece5550: applied kalman ...
2024-12-24
代做conmgnt 7049 – measurem...
2024-12-24
代写ece3700j introduction to...
2024-12-24
代做adad9311 designing the e...
2024-12-24
代做comp5618 - applied cyber...
2024-12-24
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!