CS作业代写 flex c# Assignment 2 Sagrada Game

Assignment 2 Sagrada Game
This project will allow you to implement a computer game, with some simple graphics. It is a game where you will implement some simple artificial intelligence and incorporate it in the computer player.
This project is worth 7.5% of your final grade. You must do this project on your own. The submission deadline is the last teaching day of semester, Friday 15 October 2021 at 5pm. Your submission will be marked out of 12 in the lab, then your C# code will be marked out of 8 after you submit your program.
Project Specification1
Solo player
You have been asked to write a computer version of the Sagrada board game, by Daryl Andrews and . It is an abstract game where you place coloured dice to complete a ‘window’. The object of the game is to complete the ‘window’ such that you gain the most points.
Sagrada is played over 10 rounds. Each round, random coloured dice are pulled from a bag and rolled. Players take turns choosing a dice and placing it in their ‘window’ following placement rules. There are both general placement rules and rules specific to their ‘window’. There are also special ‘tool’ actions that allow the player to reroll or change the dice, make special placements, or rearrange their existing window dice.
After 10 rounds, the players score their window, according to public and individual objectives. Players lose points for every empty position in their window, and tool token used. Winner has the most points.
The full rules are in the Sagrada_Rules.pdf file.
Your program should implement (a simplified version of) the game where the user plays the solo player variant.
The game has a set of Solo Play rules, which affect the scoring, but mean you do not need an opponent. Implement the game so the user (or a robot player – see below) can play a whole game.
1 Rules from https://boardgamegeek.com/boardgame/199561/sagrada 1

COMPX102-21B
Robot player
Tasks
A computerised version of this game will have a robot player acting as the solo player. At each turn the robot player can choose a number of dice to place (and where to place it), and whether it is using a special tool action. The robot player must only make legal moves, and can do 10 rounds.
A purely random robot player would not be that interesting to play against. So, your robot player should try to have some artificial intelligence, or ‘heuristics’, such as picking the highest scoring dice, or a dice that achieves an public or private objective. Is the computer a ‘greedy’ player, taking the dice that immediately are worth more points, or going for more long-term objectives, that might be riskier to complete.
Write a program that satisfies the specifications described above. It should make use of the programming features that you have learnt so far, in particular using classes, subclasses and methods to structure your program.
The project requires you to both get it verified in the lab and to hand in the source code. Half of the grade will be based on how the program runs and half on the structure, code style, documentation and user interface/interaction.
We suggest that you build a simplified version of the game first, and then add in more features as time permits. Concentrate on getting the objects and simple turn play right before adding fancy graphics and controls. It is easier to control all players actions, then adding a computer player once you have a basic game going. Once you have a stupid computer player, then add more intelligence and heuristics (preferably into player subclasses).
If your program is structured well, you should be able to let the user choose which robot player they want to play, and the different behaviours are provided by setting which subtype of objects are used.
2

Displays ‘window’ board and random coloured dice Can pick and place coloured dice in window Checks no adjacent same colour or value dice Checks dice placed adjacent to existing dice Loads/generates window designs/restrictions Checks dice follows window restrictions
Displays and scores private objectives
Displays and scores public objectives
Three tools implemented
Plays 10 rounds. Recognises game end and winner
Usability (layout, choice of controls, feedback, etc.):
Functionality Total:
Bonus: Use delegates to make code more flexible Bonus: Robot player implemented
Coding Style
Code Style (object design, docs, contracts, etc.):
Total:
_____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark _____ /1 mark
_____ /2 marks
_____ /12 marks
_____ /+1 mark _____ /+1 mark
_____ /8 marks
_____ /20 marks
Sagrada Game Assignment 2
COMPX102-21B
Assignment 2 Hand-in due 5pm 15th October 2021 Compress (Zip) the Visual Studio folder with your program code and submit it via Moodle.
Student Declaration of Originality
I declare that the program which I have had verified and submitted in Moodle is entirely my own work. I have not worked together with any other people. I have suitably acknowledged (referenced) any parts of other programs that I have used. I understand that if I have breached the above conditions I will be sent to the University Disciplinary Committee.
Note: This project will only be marked if this Declaration of Originality is signed.
Name: __________________________________ ID Number: ______________________________ Signed: _________________________________ Date: ___________________________________
Functionality and Usability (to be demonstrated in the lab)
3