MA471 Fall 2003 Lecture 2. On With The Games Today we are going to watch each group play a couple of rounds of cards. We will go through the game slowly.

Slides:



Advertisements
Similar presentations
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Example - The.
Advertisements

CS 206 Introduction to Computer Science II 09 / 05 / 2008 Instructor: Michael Eckmann.
© Glenn Rowe AC Lab 2 A simple card game (twenty- one)
How to Play Real Estate Dough™ Negotiate Your Way to More Dough!
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
Elevens Lab Student Material – on website
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 16: Classes and Objects.
1 Lab Session-1 CSIT221 Fall 2002 b Refresher slides b Practice Problem b Lab Exercise (Demo Required)
CS 106 Introduction to Computer Science I 04 / 02 / 2008 Instructor: Michael Eckmann.
Centinel tournament ● A deck: the numbers in random order ● A game lasts until no numbers are left in deck ● A game is played like this (first player.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
CS 106 Introduction to Computer Science I 11 / 09 / 2007 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 12 / 11 / 2006 Instructor: Michael Eckmann.
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Examples.
CS 106 Introduction to Computer Science I 11 / 08 / 2006 Instructor: Michael Eckmann.
Ways to solve problems Top down approach – Break problem up into smaller problems Bottom up approach – Solve smaller problem and then add features – Examples:
CS 106 Introduction to Computer Science I 04 / 21 / 2008 Instructor: Michael Eckmann.
AP Computer Science.  Not necessary but good programming practice in Java  When you override a super class method notation.
Main task -write me a program
1 Gentle Introduction to Programming Tirgul 2: Scala “hands on” in the lab.
CS 106 Introduction to Computer Science I 04 / 07 / 2010 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 10 / 28 / 2009 Instructor: Michael Eckmann.
VOCABULARY  Deck or pack  Suit  Hearts  Clubs  Diamonds  Spades  Dealer  Shuffle  Pick up  Rank  Draw  Set  Joker  Jack 
John Neal and Kalli Smith. Each player has a master number that starts at 10. The goal of the game is to get your opponent’s master number to 0. The first.
Software Development, Programming, Testing & Implementation.
The Parameterized Poker Squares EAAI NSG Challenge
CS1101: Programming Methodology Aaron Tan.
UML Sequence Diagrams Reading: UML Distilled Ch. 4, by M. Fowler
The basics of the Online Portal
Lecture 15 Practice & exploration Subfunctions: Functions within functions “Guessing Game”: A hands-on exercise in evolutionary design © 2007 Daniel Valentine.
Francelette’s Kindness Adventure Card Game. I. Special Rules for different difficulties I. Beginning players to Expert Players II. Being a referee for.
This presentation will guide you through creating your own family math game, including:  Choosing a topic  Developing playing cards  Designing the.
1 Documenting Your Project. 2 Documenting your Project Insert Banner Comments in your code Comment - coding statement used by humans not the compiler.
1 MA471 Introduction To Scientific Computing Fall 2003 Prof. Tim Warburton
CS 122 Engineering Computation Lab Lab 2 Dan De Sousa and Tim Cheeseman Department of Computer Science Drexel University April 2009 ©By the author. All.
BIT 142:Programming & Data Structures in C#. How To Use NUnit-based Starter Projects.
Class Usability Experience User slides are in BLUE.
Math Games Compiled By: Joan Bartlett and Heather Bartlett.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Hard Problem. Problem  Write a function that adds two numbers. You should not use + or any arithmetic operators.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Making Decisions uCode: October Review What are the differences between: o BlueJ o Java Computer objects represent some thing or idea in the real.
CSC172 Class Design Pepper. Goals How to design classes How to think in terms of objects StarUML Code Generation.
Advanced File Processing NOVEMBER 21 ST, Objectives Write text output to a file. Ensure that a file can be read before reading it in your program.
Structured Programming: Debugging and Practice by the end of this class you should be able to: debug a program using echo printing debug a program using.
CSC480 Class Design Pepper. Goals How to design classes StarUML Code Generation.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Our project main purpose is to develop a tool for a combinatorial game researcher. Given a version of combinatorial puzzle game and few more parameters,
2012: J Paul GibsonTSP: Mathematical FoundationsMAT7003/Project.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207
1 CSE 331 Model/View Separation and Observer Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia.
Week 8 : User-Defined Objects (Simple Blackjack Game)
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
CSE 403 Lecture 8 UML Sequence Diagrams Reading: UML Distilled, Ch. 4, M. Fowler slides created by Marty Stepp
Card Game Z  Agree on a dealer and a score keeper  The dealer should remove all the Jacks, Queens, Kings & Jokers from the pack and then shuffle  The.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.
Review: A Structural View program modules -> main program -> functions -> libraries statements -> simple statements -> compound statements expressions.
Java IDE Dwight Deugo Nesa Matic
G043 – Lecture 07 Specify Computer Components Mr C Johnston ICT Teacher
1 Project 6: New Venue. 2 New Venue Based on the posted New Venue scenario
Arrangements and Selections (and how they may be counted)
Topic: Introduction to Computing Science and Programming + Algorithm
Logging In ASP.Net Core 1.1.
Topic: Functions – Part 2
Logging In ASP.Net Core 2.0.
Lesson 16: Functions with Return Values
Learning to Program in Python
Lesson 12.
Term Project: Poker Game
Magpie/Chatbot Activity 5
Presentation transcript:

MA471 Fall 2003 Lecture 2

On With The Games Today we are going to watch each group play a couple of rounds of cards. We will go through the game slowly making comments and taking notes on the way. In the computing lab we will start implementing the games in a C version..

Continue Play and Game Analysis

Designing The Code Before we write a line of computer code, we should figure out what kind of structures (or classes) we are going to use. This requires us to think about what objects are getting passed between players? Also, what do we do with these objects? See:

The Objects Analysis To play cards we need: – a deck of playing cards. – a set of cards – a method of determining the suit and value of each card – each player has a hand of cards We should build the following enums (identifiers) –suit –value We should build the following structs: –deck –hand –card

Defining card Let’s not go over board on the descriptor for card A card has a value and a suit attached to it, e.g. the 7 of hearts We should be able to create and destroy a card We should be able to identify the suit and value of a card

Defining hand We should be able to: – determine the number of cards in the hand – determine the suit and value of any given card in the hand – create and destroy the hand – add and remove cards from the hand

Defining pack We should be able to: – determine the number of cards left in the pack – determine the suit and value of the next card in the pack – create and destroy pack – add and remove cards from the pack – shuffle (randomize the order the cards the pack are stored in)

Group Exercise Using the online code as a base (if you choose) you are going to create a card playing game. No strategy is required for choosing which card to play. Use a random number generator to decide which card from your hand to play at each round If there is a constraint on which card you can play based on what is visible keep generating random numbers until you can play the chosen card

Group Exercise Appoint a group leader for this exercise Decide who is going to implement what Design the objects (structs) so that they will be sufficiently flexible for your purposes Make sure each group member has a full description of objects and interfaces (appointing an object guru may help). Each member may wish to work in separate files as much as possible (e.g. card.c hand.c ….)

Group Exercise Once you have built your objects proceed to implement the game. In essence the game can be described as an object Decide what needs to be stored in the game object and what actions it needs to be able to permit..

Group Exercise Once the game is completely assembled start testing to see any problems at compile time. Debug the game by running it for one hand and output every action Test everything you possibly can – for now use print statements to follow the code…

Deadline The code should be finished by Monday 3 rd September for the class. Use and/or set up a web bulletin board to communicate between group members. Write a group report – including a section describing who did what.