Make sure your name and FSUID are in a comment at the top of the file.

Similar documents
Make sure your name and FSUID are in a comment at the top of the file.

Homework 5 Due April 28, 2017

Final Project Due August 4, 2017

CONTROLS USE SELECTED SPELL HEAVY ATTACK SHIELD SKILL / USE GAUNTLET / LEFT HAND HEAVY ATTACK INTERACT INVENTORY USE SELECTED ITEM CYCLE CYCLE

Game Artificial Intelligence ( CS 4731/7632 )

..\/...\.\../... \/... \ / / C Sc 335 Fall 2010 Final Project

YEDITEPE UNIVERSITY CSE331 OPERATING SYSTEMS DESIGN FALL2012 ASSIGNMENT III

CS Programming Project 1

Welcome to the eve of war; a conflict that will rip galaxies apart and this is where it begins. Playing the Game

A Few House Rules for Arkham Horror by Richard Launius

CSCE 2004 S19 Assignment 5. Halfway checkin: April 6, 2019, 11:59pm. Final version: Apr. 12, 2019, 11:59pm

Table of Contents. TABLE OF CONTENTS 1-2 INTRODUCTION 3 The Tomb of Annihilation 3. GAME OVERVIEW 3 Exception Based Game 3

Assignment 6 Play A Game: Minesweeper or Battleship!!! Due: Sunday, December 3rd, :59pm

Make Your Own Game Tutorial VII: Creating Encounters Part 2

CMSC 201 Fall 2018 Project 3 Sudoku

Tower Defense. CSc 335 Fall Final Project

Spring 06 Assignment 2: Constraint Satisfaction Problems

GRID FOLLOWER v2.0. Robotics, Autonomous, Line Following, Grid Following, Maze Solving, pre-gravitas Workshop Ready

Spring 06 Assignment 2: Constraint Satisfaction Problems

CS 1410 Final Project: TRON-41

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm

CS Project 1 Fall 2017

Beginning Game Programming, COMI 2040 Lab 6

CS 371M. Homework 2: Risk. All submissions should be done via git. Refer to the git setup, and submission documents for the correct procedure.

XNA RPG Battle System

Marvel Dice Masters FAQ 9/22/2014 Update at bottom, takes into effect the Uncanny X-Men Rulebook

CS1301 Individual Homework 5 Olympics Due Monday March 7 th, 2016 before 11:55pm Out of 100 Points

Era of Mages User Manual

G51PGP: Software Paradigms. Object Oriented Coursework 4

Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS

DUNGEON CRAWLER LABYRINTH

The Arena v1.0 An Unofficial expansion for Talisman by Games Workshop Copyright Alchimera Games 2012

CONTROLS THE STORY SO FAR

CONTENTS TABLE OF BOX CONTENT SECTION SECTION SECTION SECTION SECTION SECTION SECTION

BIEB 143 Spring 2018 Weeks 8-10 Game Theory Lab

Assignment 1. Due: 2:00pm, Monday 14th November 2016 This assignment counts for 25% of your final grade.

Dungeon Cards. The Catacombs by Jamie Woodhead

Design Challenge An app for game masters in pen&paper role-playing games

Programming Problems 14 th Annual Computer Science Programming Contest

Assignment 3: Fortress Defense

EZLBot Documentation. Release 1.0. EZLBot

Fleet Engagement. Mission Objective. Winning. Mission Special Rules. Set Up. Game Length

5: The Robots are Coming!

STRATEGO EXPERT SYSTEM SHELL

Let us now look at a situation a few rounds into the game, from the perspective of player 2.

A Day in the Life CTE Enrichment Grades 3-5 mblock Programs Using the Sensors

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

HW4: The Game of Pig Due date: Tuesday, Mar 15 th at 9pm. Late turn-in deadline is Thursday, Mar 17th at 9pm.

CMSC 372: Artificial Intelligence Lab#1: Designing Pac-Man Agents

In the event that rules differ in the app from those described here, follow the app rules.

CIDM 2315 Final Project: Hunt the Wumpus

HW4: The Game of Pig Due date: Thursday, Oct. 29 th at 9pm. Late turn-in deadline is Tuesday, Nov. 3 rd at 9pm.

COPYRIGHT c L&K LOGIC KOREA CO., LTD. ALL RIGHTS RESERVED.

ANACHRONISM: EQUESTRIA

Rock, Paper, Scissors

CPSC 217 Assignment 3

Gnome Wars User Manual

Thunderbolt+Apache Leader Designer's Notes

THURSDAY APRIL :00PM 10:00PM 5:00PM :00AM 3:00PM

ZODIAC FANTASY. A 24 Hour rpg

Chess Handbook: Course One

Territory war 3 unblocked Territory War 3 War war

Begin this assignment by first creating a new Java Project called Assignment 5.There is only one part to this assignment.

2003 Hasbro. All rights reserved. Distributed in the United Kingdom by Hasbro UK Ltd., Caswell Way, Newport, Gwent NP9 0YH. Distributed in the U.S.A.

Mage Tower Rulebook Ver 0.1

4.4.11a Tweaked rule to bring it in line with c (overassigning damage is legal, breakthrough damage is not mandatory)

PO Box Austin, TX

Final Project Specification

LAXIUS FORCE III. (by Aldorlea Games)

KARP: Kids and Adults Role-Playing

COPYRIGHTED MATERIAL. Learning to Program. Part. In This Part

BOLT ACTION COMBAT PATROL

MMORPG REVIEW! ONLINE MAGAZINE VOLUME: 1 ISSUE: 1 NOVEMBER 2005 TABLE OF CONTENTS TABLE OF CONTENTS KAL-Online First Korean 3D Fantasy...

Notes about the Kickstarter Print and Play: Components List (Core Game)

Contents. In short. Set up

Shaun Austin Jim Hartman

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger

All about Go, the ancient game in which AI bested a master 10 March 2016, by Youkyung Lee

Pay attention to how flipping of pieces is determined with each move.

Requirements Specification. An MMORPG Game Using Oculus Rift

Fully compatible with all the other Arcanum expansion, you will find this just adds more fun and options to the already fun mix.

Contents Commands for Agent... 2 Commands for world... 3

THE RULES 1 Copyright Summon Entertainment 2016

1 Introduction. 2 Background and Review Literature. Object-oriented programming (or OOP) is a design and coding technique

SHORT FILM DISCUSSION QUESTIONS EPISODES 1-10

By Night Studios: Basic Combat System Overview

QUICKSTART. Game Modes. Combat Roles. Customizing and Learning. Assembling your Team. PvP - Competitive: PvE - Cooperative:

There are some basic rules you will need to know to play the game. We will review them in this section.

ABOUT THIS GAME. Raid Mode Add-Ons (Stages, Items)

DUNGEON THE ADVENTURE OF THE RINGS

Due: Sunday 13 November by 10:59pm Worth: 8%

PROFILE. Jonathan Sherer 9/30/15 1

Procedural Content Generation

Procedural Content Generation

Defenders of the Realm: Battlefields 1. Player seating arrangement -

CSC242 Intro to AI Spring 2012 Project 2: Knowledge and Reasoning Handed out: Thu Mar 1 Due: Wed Mar 21 11:59pm

Rags to Riches. Written by Allan JC Smith IV. Sample file. Art by Mitchell Nolte Layout by Craig Judd

Unit List Hot Spot Fixed

Marvel Hero Deck Card Game Rules v (April 2017)

Powers and Abilities

Transcription:

Homework 2 Due March 6, 2015 Submissions are due by 11:59PM on the specified due date. Submissions may be made on the Blackboard course site under the Assignments tab. Late submissions will be accepted up to one day late with a 10% penalty. Make sure your name and FSUID are in a comment at the top of the file. In this assignment, you will be writing a text-based RPG. The goal of this assignment is to gain experience with OOP in Python as well as basic networking. The name of our text-based RPG is Fatal Error. There is a single level which is composed of a 5-by-5 grid. As shown below, the player is initially positioned on the leftmost center square. The grid should be randomly initialized with 2 elements: a backpack (the objective) and a rat trap (an encounter with which will instantly end the game). Additionally, there should be 4 enemies randomly placed on the grid. An example initialized grid is shown below: E E R P E B E The interface is very simple; users can enter one of 5 commands: help, quit, go [N, S, E, W], health, and attack. Command help quit go [N, S, E, W] health attack Action Print the commands available to the user Print a small message and immediately end the game Move the player one space in the specified direction Print the player s current HP Attack the current opponent There is only one kind of enemy, the Evil Robot. The player may choose one of two classes: CodeWarrior or 1337Hax0r. The statistics for each of these character types are listed below. Character Type Max HP Strength Defense Evil Robot 15 9 7 CodeWarrior 30 10 8 1337Hax0r 30 8 10 1

You are required to have the following classes implemented: Character, Player, EvilRobot, CodeWarrior, and Hax0r. Both Player and EvilRobot are derived from Character. Code- Warrior and Hax0r are further derived from Player. The methods help(), health(), go(), attack(), and quit() must be defined in the Player class (these may or may not have arguments depending on your design and usage). It is up to you to determine the other details of these class implementations (for example, which attributes the classes should have and which attributes/methods are common to multiple character types and should therefore be derived from an inherited class). Damage from attacks is calculated in the following code snippet. You are free to come up with a different system. This code snippet does not include checks for win/death conditions. When an opponent dies, it should be removed from the grid. def calc_damage(self, opponent): damage = randint(0, 6) + self.strength - opponent.defense if damage <= 0: print "{} evades {} s attack.".format(opponent.name, self.name) else: opponent.hp = opponent.hp - damage print "{} attacks {} for {} points of damage!".format( self.name, opponent.name, str(damage)) It is important to note that the attack command should not be effective when an enemy hasn t been encountered. Likewise, the go command should not be effective when the player is in combat. When you have implemented the game and you are sure that it works correctly, modify it to create a game server. The server should listen on localhost:9000 and handle multiple concurrent connections. A player should be able to connect to the game server using the following command on linux: telnet localhost 9000. You are free to use whichever networking tools available to you in Python, including the sockets module, SocketServer module, and Twisted. Sample command line runs are provided below for clarity: Sample Run 1: $ python rpg.py Are you a CodeWarrior or 1337H4x0r? Enter [c] or [h]: c > help go [N, S, E, or W] quit attack 2

health help Caitlin has 30HP. Caitlin doesn t see anything worth attacking. > quit Caitlin has lost all hope and locked themself in the ACM office to read ancient ACM magazines and await their final doom. Sample Run 2: caitlin@caitlin-vpceb19fx:~/teaching/python/demos$ python rpg.py Are you a CodeWarrior or 1337H4x0r? Enter [c] or [h]: h > go Caitlin can t run from the Evil Robot. Evil Robot attacks Caitlin for 5 points of damage! Caitlin attacks Evil Robot for 2 points of damage! Caitlin has 25HP. 3

Evil Robot attacks Caitlin for 2 points of damage! Caitlin has 23HP. Evil Robot attacks Caitlin for 2 points of damage! Caitlin attacks Evil Robot for 1 points of damage! Caitlin attacks Evil Robot for 2 points of damage! Evil Robot attacks Caitlin for 3 points of damage! Caitlin has 18HP. Caitlin attacks Evil Robot for 3 points of damage! Evil Robot attacks Caitlin for 3 points of damage! Caitlin attacks Evil Robot for 3 points of damage! Evil Robot attacks Caitlin for 1 points of damage! 4

Caitlin attacks Evil Robot for 2 points of damage! Caitlin attacks Evil Robot for 1 points of damage! Evil Robot attacks Caitlin for 1 points of damage! Evil Robot attacks Caitlin for 4 points of damage! Caitlin attacks Evil Robot for 1 points of damage! Caitlin has 9HP. Caitlin ran into one of those legendary mechanical rat traps in the Love basement. RIP. Sample Run 3: caitlin@caitlin-vpceb19fx:~/teaching/python/demos$ python rpg.py Are you a CodeWarrior or 1337H4x0r? Enter [c] or [h]: c Evil Robot attacks Caitlin for 4 points of damage! 5

Evil Robot attacks Caitlin for 6 points of damage! Caitlin attacks Evil Robot for 9 points of damage! Caitlin attacks Evil Robot for 8 points of damage! Evil Robot attacks Caitlin for 5 points of damage! Caitlin attacks Evil Robot for 3 points of damage! Evil Robot attacks Caitlin for 3 points of damage! Caitlin has 12HP. > gow Caitlin doesn t know what you re talking about. Evil Robot attacks Caitlin for 5 points of damage! Evil Robot attacks Caitlin for 7 points of damage! Caitlin s epic backpack search has come to an end. RIP. 6

Sample Run 4 $ python rpg.py Are you a CodeWarrior or 1337H4x0r? Enter [c] or [h]: h Evil Robot attacks Caitlin for 2 points of damage! Congratulations, Caitlin found their backpack!!! And so, our hero safely makes their way to the exit. Luckily, Caitlin made it out alive this time. But one thing is for sure: Caitlin will never put off studying for for their final exams ever again. 7