Date Submission: January 29, 2011 Submitted by: Syeda Khushbakth Rizvi Syed Hasan Asghar Submitted to: Ms. Quratul-Ain Nizam-ud-din Rajput DATA STRUCTURES.

Slides:



Advertisements
Similar presentations
Cash Flow 101 Instructions
Advertisements

Picture It Very Basic Game Picture Pepper. Original Game import java.util.Scanner; public class Game { public static void main() { Scanner scan=new Scanner(System.in);
Craps. /* * file : Craps.java * file : Craps.java * author: george j. grevera, ph.d. * author: george j. grevera, ph.d. * desc. : program to simulate.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
1 Counting. 2 Situations where counting techniques are used  You toss a pair of dice in a casino game. You win if the numbers showing face up have a.
Gunn AP CS Settlers of Catan Incremental Design Plan.
DGame Task Task 1Task 2Task 3Task 4 Task 5Task 6Task 7Task 8 Task 9Task 10Task 11 NC Level 3 to 8.
Activity 1: Where am I? Play in pairs Each player has a number line or bead string and a pack of number cards Each player takes turns to turn over a number.
Chapter 5 Probability Distributions. E.g., X is the number of heads obtained in 3 tosses of a coin. [X=0] = {TTT} [X=1] = {HTT, THT, TTH} [X=2] = {HHT,
Probability in Games. What is Probability? Probability is a branch of mathematics that deals with calculating the likelihood an event will _____ and is.
You can work with a partner. Each of you should be familiar with all aspects of the game. This project has two components: #1: the game Playability, appearance,
A Ludo game langa kattai
Modified Monopoly. Version I All players start with $1500. All players receive $200 when passing GO (Salary). Normal rules apply.
Java Risk game Slide 1 The rules of RISK Simon Forey.
12 Pontoon1May Pontoon program CE : Fundamental Programming Techniques.
A Game Of Strategy … Or Luck? Serene Li Hui Heng Xiaojun Jiang Cheewei Ng Li Xue Alison Then Team 5, MS&E220 Autumn 2008.
Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes.
Chapter 25 GRASP: More Objects with Responsibilities 1CS6359 Fall 2011 John Cole.
Lecture 15 Graphical User Interfaces (GUI’s). Objectives Provide a general set of concepts for GUI’s Layout manager GUI components GUI Design Guidelines.
Monopoly Information for Assignment. Game Management Subsystem Game manager Deregister player Edit game View games Set up game > View game state Start.
NDopoly! Group Members: Jason Lacher Matthew Fallon Project: “NDopoly” a Notre Dame version of the board game Monopoly tm.
The RECEIVABLES Module Beyond Basics Slideshow 2B.
“Real” Monopoly. NEW RULES Along with the original rules we know and love, there will be a few new ones… – There are now Presidents! – Welfare! – Economic.
Chapter 6: Graphical User Interface (GUI) and Object-Oriented Design (OOD) J ava P rogramming: Program Design Including Data Structures Program Design.
Lucky Candies Probability Game By: Laura Santa Maria Isabella Moreno.
MONOPOLY MODERN GAME.
MMTS Interface Design Description. Interface for command line usage java.\Monopoly -h Usage: Monopoly [options] options: -gNUMPlay NUM games with the.
Tuesday April 7, 2015 Agenda Turn in Projects Review of Businesses Types of Competition/Profit Notes Remake Monopoly Classwork Homework Finish Classwork.
Game Design Creating a game called PING Phase 3: Steps for building basic game.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 16: Java Applets & AWT Fundamentals of Web Programming.
ACM/JETT Workshop - August 4-5, ExceptionHandling and User Interfaces (Event Delegation, Inner classes) using Swing.
Brian Duddy.  Two players, X and Y, are playing a card game- goal is to find optimal strategy for X  X has red ace (A), black ace (A), and red two (2)
Computing and the Web Simulation. Overview n Reasons for Simulation n Building a Model n Monopoly Game Simulation n SimCity Simulation n Design of Computer.
Naďa Heráková. Chess The classic board game for two players in the form of competition also considered the sport sector. It represents the clash of two.
MMTS Interface Requirements Specification. Interface for command line usage java.\Monopoly Usage: Monopoly … options: -g number of games to play with.
Visual Basic Games: Prepare for Hangman
Othello Artificial Intelligence With Machine Learning
Case Study: Game2D with Method Design
Database Chess A server-based web gaming application by Jordan Arnold.
F27SB2 Software Development 2 Lecture 6: Java GUIs 5.
Probability (Grade 12) Daljit Dhaliwal. Sticks and Stones game.
You are going to work in pairs to produce a Maths board game.
Chapter 7: Object Design Examples with GRASP. Objective Design use case realizations. Apply GRASP to assign responsibilities to classes. Apply UML to.
VB Games: Preparing for Memory Brainstorm controls & events Parallel structures (again), Visibility, LoadPicture, User-defined procedures, Do While/Loop,busy.
Probability in Games. What is Probability? Probability is a branch of mathematics that deals with calculating the likelihood an event will occur and is.
Objectives of This Session
Visual Basic Games: Week 4 Recap Parallel structures Initialization Prepare for Memory Scoring Shuffling Homework: when ready, move on to next game/chapter.
Java GUI. Graphical User Interface (GUI) a list a button a text field a label combo box checkbox.
Monopoly Transaction Practice1 Monopoly Transaction Practice! Start of game with $1500.
Probability Evaluation 11/12 th Grade Statistics Fair Games Random Number Generator Probable Outcomes Resources Why Fair Games? Probable Outcome Examples.
Java Programming: From Problem Analysis to Program Design, 3e Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Java Programming: From Problem Analysis to Program Design, Second Edition1 Lecture 5 Objectives  Learn about basic GUI components.  Explore how the GUI.
Author Ivan Dominic Baguio. ABOUT THE GAME Game Objective  The goal of each player in the game is to discard all cards in his hand before every other.
Java Programming, Second Edition Chapter Thirteen Understanding Swing Components.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
 What is the game about?  Looking into the algorithm  Looking into the code  Complexity and conclusions.
DO Now: Turn in Walmart reflection sheets on Ms. van den Berg’s desk then sit down quietly.
More on Logic Today we look at the for loop and then put all of this together to look at some more complex forms of logic that a program will need The.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
New Ways of Thinking The economic ideas that are shaping the world.
JA Our City Name Title Company. Session 1 Our city: A Place Where People Live, Work, and Play 1.
100 Jeopardy Integer Add/SubMiscellaneous Integer Mult/DivideWord Problems Advanced.
PROBABILITY How to win at Monopoly. Flipping a Coin Will a flipped coin be HEADS or TAILS? Can’t know for sure! Is one more LIKELY?
Investing in Real Estate SS.4.FL.1.5 People can earn income by renting their property to other people. SS.4.FL.4.2 Identify instances when people use credit,
Presidential Mania 2-4 players ages 9+ Object: to travel around the board, and reach the White House. Contents: 1 presidential game-board, 4 colorful pieces,
An interesting item involving maths-MONOPOLY
Chapter 9: Graphical User Interfaces
Writing Expressions Game
Exception Handling and Event Handling
Colorama Lukasz and Kenny Introduce group members.
Presentation transcript:

Date Submission: January 29, 2011 Submitted by: Syeda Khushbakth Rizvi Syed Hasan Asghar Submitted to: Ms. Quratul-Ain Nizam-ud-din Rajput DATA STRUCTURES AND ALGORITHMS CSE FALL 2010 – BS-III TERM PROJECT - MONOPOLY

INTRODUCTION: Monopoly is a board game published by Parker Brothers, a subsidiary of Hasbro. The game is named after the economic concept of monopoly, the domination of a market by a single entity. The Monopoly game board consists of forty spaces containing twenty- eight properties (twenty-two colored streets, four railroads and two utilities), three Chance spaces, three Community Chest spaces, a Luxury Tax space, an Income Tax space, and the four corner squares: GO, Jail, Free Parking, and Go to Jail.

GOALS AND LEARNING: Goal of the game: Is to bankrupt the opponent as soon as possible, via rents and mortgage. Goal of the project: To use the data structures learned during the course and implement them efficiently. To make use of techniques of GUI. To create a two player game, played against bot.

SCOPE AND LIMITATIONS: SCOPE: The game makes use of three operations only, out of many which are originally used: Buy, rent and pay taxes. LIMITATIONS: The game doesn’t have an ending message, as it is logically deduced that when the opponents cash is finished or have a negative balance the counter-part wins. There are no houses in estates and rents are doubled when all the properties of a particular color is monopolized. Mortgages are not included in the game operations. Banks are not included either.

PROGRAMMING TOOLS: o Data structures : Arrays o Built-in class: AWT 1.Action Listener 2.Action Event 3.Buffered Image Swing 1.Button 2.Panel 3.Label 4.Frame o Text tool

ALGORITHM: In start, human plays first. On click of dice roll, piece will move. Roll dice uses random number generator. Movement is done by Cartesian coordinate system. For each estate, either estate can be rented or bought when clicked on buy. When clicked on done the turn ends. Similarly, Bot will play. Options are available for the players if they want to buy an estate or pay rent and move on. These messages are displayed in the frames and labels. The estates on the game board are pictures, whose particulars are saved in arrays’ index. When a particular piece lands on a estate, that particular array index is retrieved, and its elements manipulated. If you get on community chest or chance, changes in the money or location will come about accordingly. If you get in jail, 50 units of money is detected and the location is reverted 20 places.. If the money is not available, the game ends.

ALGORITHM: CONTD.. The money is deduced according to the choices made by the player. This also depends on the chance cards and community chest cards which are awarded randomly. Rents are added or deducted on the next dice roll. If a player’s money is finished, they lose.

INTERFACE: Nine classes are made to implement the game efficiently. Public class Chancearray{} Public class communitychestarray{} Public class Estates{} Public class Monopoly{} Public class Player{} Public class whichplayer{} Public class Boardestate{} Public class cardsobject{}

METHODS IMPLEMENTED: public static void fillimagearray() public Monopoly() // handles GUI operations public void paint(Graphics g) // marks bought estates public void draw(Graphics g) throws InterruptedException // makes images of estates on the game board public static int move() // move human’s piece public static int move1() // moves bot’s piece public static int injail(int x, Player p) // calculate jail penalty public int checklast(int location, Player p) // gets last position of piece public static void checkwin(Player p,Player ip) throws InterruptedException // checks if a player is winning yet

METHODS IMPLEMENTED: CONTD.. public static void checkestate(int move, Player p) // see if estate is available public static boolean checklabel(int x) public static void humanmove() throws InterruptedException public static void computermove() throws InterruptedException public static void gettingchance(Player p) // gives chance card public static void gettingcommunitychest(Player p) // gives community card public static void main(String args[]) throws Exception public void setxy() // initialize coordinates Public int getx(int x) // retrieves value of x coordinate Public int gety(int x) // retrieves value of y coordinate public Player(int p,String n)

METHODS IMPLEMENTED: CONTD.. public Estates() public void setcc() public void getcc(int x, Player p) public communitychestarray() public void setchance() public void getchance(int x,Player p) public Chancearray() public cardsobject() public void setvalue() public Boardestate()