关键词 > COMP1405/1005

COMP 1405/1005 (Fall 2022) − "Introduction to Computer Science I" Specification for Assignment 06

发布时间:2022-11-07

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP 1405/1005 (Fall 2022) − "Introduction to Computer Science I"

Specification for Assignment 06

Your submission for this  assignment must include your full name  and your nine-digit student number as a comment at the top of the sourcefile you submit. All source codefiles must be written using the Python 3 programming language.

Submissions that crash (i.e., terminate with an error) on execution will receive a mark of 0.

Officially, the Due Date for this Assignment is:             Friday, November 4, 2022, at 11:59pm EST.

Late Submissions are Accepted Without Penalty Until Sunday, November 6, by 11:59pm EST.

Submissions received after that will not be accepted and will receive a mark of 0.

For this assignmentyou will design and implement a simple board game, and then animate a random playthrough (using pygame) by two computer-controlled opponents, updating the display after each player's turn. An observer "watching" the game should see the dice values rolled by the current player, and if the game requires additional elements (e.g.,  "snakes" and "ladders") then these must also be depicted. This assignment will allow you to work with more complex nested looping structures, and will also help you recognize the needforfunctions (coming soon, but not required here).

In order to complete this task, you will need to:

.   choose the grid1 for your game board from these options2 : 42, 56, 72, 90, 110, 132, 156

.   choose how many (at least 2) and what type of "dice" will be used3 to play your game

.   choose and implement at least two of the board game "features" from Table 1, below

Your submission for this assignment:

.   must be a source code file with filename   'comp1405_f22_#########_assignment_06.py'

.   must use a WHILE loop for the game, terminating when either player reaches the end

.   must draw a checkerboard pattern for your board game using pygame and nested FOR loops

.   must draw the players on the board and use variables to store the location of each player

.   must alternate "turns" between the two players

.   must roll "dice" (using random.randint) each iteration, for the player whose "turn" it is

Table 1.

Board Game "Features" to Consider

"Ladder Connections"

reaching certain squares advances player to others

"Snake Connections"

reaching certain squares returns player to others

"Numbered Tiles"

all squares numbered using a pygame.font

"Double Moves"

permit a double move on certain conditions

"Extra Turns"

grant an extra turn on certain conditions

"Missed Turns"

force a lost turn on certain conditions

"Exact Requirements"

players can't move past the end

of the board

"Sorry Collisions"

if player lands on other, send it

back to start

…other features might also be acceptable - contact your instructor if you want to try something more complex!