Classes in the game

am getting really frustrated because im trying to finish my assignment and ive hit a total brick wall, im sure the information is in my head i just can;t implement it.
am trying to write a simple game with a GUI which generates random number of pieces then the user takes a number of pieces the computer takes a number of pieces and so on until the last player takes the last piece and they lose.
Have done the GUI mainly, save for a couple of features I may add in if time. What im stuck on is the classes and inheritance. I want a class called Player which then extends to Enemy(computer) and Person. I don't know if the way Ive started means I can't do this or what
this is my code (again)
The main class:
import javax.swing.*;
import java.awt.event.*;
import java.util.Random;
public class Game extends JFrame
    public static void main (String [] args)
    new Game();
    Random generator = new Random();
   public int runningTotal = 10+generator.nextInt(100);
    String number = Integer.toString(runningTotal);
private Player human;
private Player enemy;
private JTextField text1;
private JButton button1;   
private JButton button2;
private JTextField text2;   
private JTextField text3;   
private JButton button3;
private JTextField text4;
private JTextField text5;
public JTextField text6;
private JTextField text7;
public Game()
    human = new Player();
    enemy = new Enemy();
    this.setSize(400,400);
    this.setTitle("Nim");
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     panel aPanel = new panel();
    JLabel label2 = new JLabel("Enter your name,then press OK");
    text2 = new JTextField(10);
    aPanel.add(label2);
    aPanel.add(text2);
    this.add(aPanel);
    this.add(aPanel);
    ClickListener c1 = new ClickListener();
    button1 = new JButton("OK");
    button1.addActionListener(c1);
    aPanel.add(button1);
    this.add(aPanel);
    JLabel label3 = new JLabel("Current Player");
    text3 = new JTextField(10);
    text3.setEditable(false);
    aPanel.add(label3);
    aPanel.add(text3);
    this.add(aPanel);
    this.add(aPanel);
    JLabel label4 = new JLabel("Enter your pick,then press My Turn");
    text4 = new JTextField(5);
    aPanel.add(label4);
    aPanel.add(text4);
    text4.setText(""+0+"");
    this.add(aPanel);
    this.add(aPanel);
    ClickListener c3 = new ClickListener();
    button3 = new JButton("My Turn");
    button3.addActionListener(c3);
    aPanel.add(button3);
    this.add(aPanel);
    JLabel label5 = new JLabel("Your last pick was");
    text5 = new JTextField(5);
    text5.setEditable(false);
    aPanel.add(label5);
    aPanel.add(text5);
    this.add(aPanel);
    this.add(aPanel);
    JLabel label6 = new JLabel("Winner");
    text6 = new JTextField(10);
    text6.setEditable(false);
    aPanel.add(label6);
    aPanel.add(text6);
    this.add(aPanel);
    this.add(aPanel);
    text7 = new JTextField(20);
    text7.setEditable(false);
    aPanel.add(text7);
    this.add(aPanel);
    ClickListener c2 = new ClickListener();
    button2 = new JButton("EXIT");
    button2.addActionListener(c2);
    aPanel.add(button2);
    this.add(aPanel);
    this.setVisible(true);
class panel extends JPanel
   public panel()
    JLabel label1 = new JLabel("Number of Pieces");
    text1 = new JTextField(20);
    text1.setText(number);
    this.add(label1);
    this.add(text1);
private class ClickListener
        implements ActionListener
    private int clickCount = 0;
    public void actionPerformed (ActionEvent e)
      String name = text2.getText();
      if (e.getSource() == button1)
            text3.setText(""+name+"");
       int pick = Integer.parseInt(text4.getText());
     int number = Integer.parseInt(text1.getText());
       runningTotal = (number - pick);
      if (pick < 10)
      if (e.getSource() == button3)
       text5.setText(""+pick+"");
       text1.setText(""+runningTotal+"");
      if (pick <= 0)
          text5.setText("Pick a number");
    if (runningTotal <=0)
          text7.setText("Game Over "+name+"");
         // human.checkWin();
      if (e.getSource()== button2)
         System.exit(0);
      text2.requestFocus();
[ /code]
The player class so far: import javax.swing.*;
public class Player
int runningTotal;
int win;
public JTextField text6;
public void checkWin()
if (runningTotal <= 0)
text6.setText("u win") ;
enemy so far has nothing in it, i need it to work out the number of pieces its taking from a formula.
Just a bit of advice from someone who knows what they are doing would help

If I understand your question, You cannot extend from two classes in Java. You cannot extend Player from Enemy and Person directly.
You can achieve this by using interfaces. Please read java tutorial from sun for more info.

Similar Messages

  • Connecting my GUI class to my Game class

    Hi guys I build my GUI with netBeans 6.0 and I used a seperate source package for my number game and for my GUI. Now I know I have to make one of the main classes extending an Action Listener but I don't know which one the main class of the game or the main class of the GUI. And is it possible to connect them if they are in seperate packages, although I assume everything is possible. Thanks in advance!

    The problem is solved.

  • Loading external swfs extending from classes in the same shared codebase

    Hey there!
    I'm currently developing a game in flash and want to be able to divide up my .fla assets in a way that means artists can work on a game menu .fla in isolation from the game.fla and rest of the game code.
    If I could briefly explain how I've approached this so far, I would be extremely if people could shout in my general direction and tell me I am stupid, or even better still, give me helpful advice as to where I am going wrong and how I can correct it!
    My project is setup like this:
    HighScoreMenu.fla -> document class HighScoreMenu extending GameMenu class.
    game.fla ->document class game.as
    game.as class loads the published HighScoreMenu.swf and manipulates the menu i.e. animates on and off screen via inherited functions in the GameMenu class.
    Now this seemed to work to begin with, until my code evolved and upon going to publish my HighScoreMenu.fla flash started complaining about symbols being used in Game.as that were in Game.fla...  If I'm only publishing the HighScoreMenu which extends from GameMenu then why is it even looking to compile Game.as?
    Can you spot the problem in the way I am doing this, or is there a better approach I should try?
    Any advice greatly appreciated!
    Stevie.

    No it doesn't seem to, however though they both have a reference to the HighScoreManager so there is some overlap there between menu and game code, but the menu classes don't reference any symbols on the game.fla...
    Just to clarify, I have an fla HighScoreMenu.fla, which has a child symbol HighScoreMenu which uses the following class.
    public dynamic class HighScoreMenu extends GameMenu
         //convenient storage for competition Manager object
         private var _highScoreManager:HighScoreManager;
    The game then loads this class as follows:
    I load the swf "HighScoreMenu.swf" and once its loaded I obtain the menu class like so:
    var cls:Class = Class( applicationDomain.getDefinition("Menus.HighScoreMenu") );
    var object:* = new cls();
    ...and create a new instance of the menu.
    Is there anything fundamentally wrong with approaching it in this way?

  • Need help on mobile gaming development basic  {working the game main menu}

    package Assignment1;
    import java.io.IOException;
    import java.util.Random;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.lcdui.game.Sprite;
    public class a1Canvas extends GameCanvas implements Runnable{
        private Display display;
        private Sprite ufoSprite;
        private Image backgroundImage;
        private long frameDelay;
        private int ufoX;
        private int ufoY;
        private int ufoXDir;
        private int ufoXSpeed;
        private int ufoYSpeed;
        private Random rand;
        private Sprite[] roidSprite = new Sprite[3];
        private boolean gameOverState;
        //constructor
        public a1Canvas(Display display){
            super(true);
            this.display = display;
            frameDelay = 33;
            gameOverState = false;
        public void start(){
            display.setCurrent(this);
            //start the animation thread
             rand = new Random();     // Initialize the random number generator
             ufoXSpeed = ufoYSpeed = 0; // Initialize the UFO and roids sprites
            try {
                backgroundImage = Image.createImage("/background.jpg");
                ufoSprite = new Sprite(Image.createImage("/ufo.png"));
                //initialise sprite at middle of screen
                ufoSprite.setRefPixelPosition(25,25);
                ufoX = (int)(0.5 * (getWidth()- ufoSprite.getWidth()));
                ufoY = (int)(0.5 * (getHeight()- ufoSprite.getHeight()));
                ufoSprite.setPosition(ufoX, ufoY);
                Image img = Image.createImage("/Roid.png");
                roidSprite[0] = new Sprite(img, 42, 35);   //create 1st frame-animated asteroid sprite
                roidSprite[1] = new Sprite(img, 42, 35);
                roidSprite[2] = new Sprite(img, 42, 35);
            } catch (IOException ex) {
                System.err.println("Failed to load images");
            Thread t = new Thread(this);
            t.start();
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        private void draw(Graphics graphics) {
            //clear background to black
            graphics.setColor(0, 0, 0);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            //draw the background
            graphics.drawImage(backgroundImage, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
            ufoSprite.paint(graphics);
            for(int i=0;i<3;i++){
                roidSprite.paint(graphics);
    flushGraphics(); //flush graphics from offscreen to on screen
    private void update() {
    // Process user input to control the UFO speed
    int keyState = getKeyStates();
    if ( (keyState & LEFT_PRESSED) != 0 )
    ufoXSpeed--;
    else if ( (keyState & RIGHT_PRESSED) != 0 )
    ufoXSpeed++;
    if ( (keyState & UP_PRESSED) != 0 )
    ufoYSpeed--;
    else if ( (keyState & DOWN_PRESSED) != 0 )
    ufoYSpeed++;
    ufoXSpeed = Math.min(Math.max(ufoXSpeed, -8), 8);
    ufoYSpeed = Math.min(Math.max(ufoYSpeed, -8), 8);
    ufoSprite.move(ufoXSpeed, ufoYSpeed); // Move the UFO sprite
    checkBounds(ufoSprite); // Wrap UFO sprite around the screen
    // Update the roid sprites
    for (int i = 0; i < 3; i++) {
    roidSprite[i].move(i + 1, 1 - i); // Move the roid sprites
    checkBounds(roidSprite[i]); // Wrap asteroid sprite around the screen
    // Increment the frames of the roid sprites; 1st and 3rd asteroids spin in opposite direction as 2nd
    if (i == 1)
              roidSprite[i].prevFrame();
    else
              roidSprite[i].nextFrame();
    // Check for a collision between the UFO and roids
    if ( ufoSprite.collidesWith(roidSprite[i], true) ) {
    System.out.println("Game Over !");
    gameOverState = true;
    }//if
    }//for
    public void stop(){
    gameOverState = true;
    private void checkBounds(Sprite sprite) {
    // Wrap the sprite around the screen if necessary
    if (sprite.getX() < -sprite.getWidth())
         sprite.setPosition(getWidth(), sprite.getY());
    else if (sprite.getX() > getWidth())
         sprite.setPosition(-sprite.getWidth(), sprite.getY());
    if (sprite.getY() < -sprite.getHeight())
         sprite.setPosition(sprite.getX(), getHeight());
    else if (sprite.getY() > getHeight())
         sprite.setPosition(sprite.getX(), -sprite.getHeight());
    private void gotoMainMenu(Graphics graphics) {
    graphics.setColor(0, 0, 0);
    graphics.fillRect(0, 0, getWidth(), getHeight());
    graphics.setColor(255, 0, 0);
    graphics.drawRect(0, 0, getWidth()-1, getHeight()-1);
    graphics.setColor(255, 255, 255);
    graphics.drawString("GAME NAME", getWidth()/2 -50, 30, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(255, 0, 0);
    graphics.drawString("Main Menu", getWidth()/2 -50, 50, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(0, 255, 0);
    graphics.drawString("Start Game", getWidth()/2 , 80, Graphics.LEFT | Graphics.TOP);
    graphics.drawString("Instructions", getWidth()/2 , 110, Graphics.LEFT | Graphics.TOP);
    flushGraphics();
    int keyState = getKeyStates();
    if ( (keyState & FIRE_PRESSED) != 0 ){
    System.out.println("game start");
    gameOverState = false;
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    kdoom wrote:
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)You didn't have to create a whole new post just for the formatted code, silly. You could have just replied in the old thread. Anyway:
    Step through the program and think about what each line is doing. Most importantly:
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        }This says that while the game is being played, update( ), then draw( ). When the game is over, call gotoMainMenu( ).
       private void gotoMainMenu(Graphics graphics) {
            //do a bunch of graphics stuff
            int keyState = getKeyStates();
            if ( (keyState & FIRE_PRESSED) != 0 ){
                System.out.println("game start");
                gameOverState = false;
        }This says to do a bunch of graphics stuff, and then to check the key states. If fire is being pressed, print something out and set gameOverState to false. This check only happens once. When the state is being checked, most likely the user will not be pressing any keys, so the code is done.
    Also, simply setting the gameOverState variable to false outside of the loop you use it in won't do anything. For example:
    boolean doLoop = true;
    int count = 0;
    while(doLoop){
       count++;
       if(count > 10){
          doLoop = false;
    doLoop = true;Would you expect that second doLoop = true to start the while loop over?

  • Button click loading a class, close the current

    Probably won't be the best explanation, but I'm trying to make a game for a school project. We have a title page with two buttons on it, one for loading the two-player game and one for loading the one-player game. Right now I have it so it will load the other classes, but I can't find a way to get the title page window to close when it loads the game itself. That's the first of my problems, another is that when the game does load, the buttons that I used don't appear until I drag the window. The frame itself will load, and the background loads when i mouse over it, but the buttons say invisible until dragging the window. Thanks for any help, it's much appreciated.

    do you see any javascript error message (yellow icon) at the status bar of the browser window,
    Regards
    Raja

  • HT1752 I.downloaded.a.game.sims.3.and.the.game.will.not.install.what.is.the.problem?

    When.i.download.the.game.it.works.fine.but.as.soon.as.i.try.to.install.it.it.doe s.nothing.it.acts.like.its.about.to.do.something.but.then.nothing..I.talked.to.t he         
    people.who.i.bought.the.game.from.and.im.pretty.sure.its.not.the.game.but.the.co mputer.its.self.please.tell.me.what.i.need.to.do!

    Why are there periods between each word in your post?
    As for Sims 3, it will not run on your Mac. You should have checked the system requirements:
    FOR MAC OS X
    Mac OS X 10.5.7 Leopard or higher
    Intel Core Duo Processor
    2 GB RAM
    ATI X1600 or Nvidia 7300 GT with 128 MB of Video RAM, or Intel Integrated GMA X3100.
    At least 6.1 GB of hard drive space with at least 1 GB of additional space for custom content and saved games
    This game will not run on PowerPC (G3/G4/G5) based Mac systems, or the GMA 950 class of integrated video cards.
    http://gb.thesims3.com/game/systemreq

  • Problem using the applet for the game design!

    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
    /* <applet code="Gameshtap2.class" width ="500" height="600">
    </applet>
    public class Gameshtap2 extends Applet implements ActionListener,KeyListener,MouseListener,MouseMotionListener,Runnable
    Thread t;
    Button b1,b2;
    int y=0;
    int Xpos=480;
    char keyChar='A';
    public void init()
    t=new Thread();
    b1=new Button("Start");
    b2=new Button("Stop");
    add(b1);
    add(b2);
    b1.addActionListener(this);
    b2.addActionListener(this);
    addKeyListener(this);
    this.requestFocus();
    this.setFocusable(true);
    addMouseListener(this);
    addMouseMotionListener(this);
    public void paint(Graphics g)
    int no;
    g.drawArc(0,y,100,100,30,300);
    g.drawLine(50,y+50,50+(int)(50*Math.cos(3.14159/6)),y+50-(int)(50*Math.sin(3.14159/6)));
    g.drawLine(50,y+50,50+(int)(50*Math.cos(3.14159/6)),y+50+(int)(50*Math.sin(3.14159/6))); 
    for(int i=0;i<10;i++)
       no=(int)(Math.random()*600);
       g.drawOval(Xpos,no,10,10);
       if(Xpos<=480 && Xpos>=0)
         Xpos=Xpos--;
        if(Xpos>480 || Xpos<0)
          Xpos=480;
    public void actionPerformed(ActionEvent e)
    if(e.getSource()==b1)
         if (t == null)
              t=new Thread(this);
              t.start();       
    } else if(e.getSource()==b2)
         if(t!=null)    
                  t = null;
    public synchronized void keyPressed(KeyEvent ep)
    switch(ep.getKeyCode())
         case KeyEvent.VK_DOWN:y+=10;
                              if(y>=490)
                                 y=0;
                              else if(y<=0)
                              y=490;               
                   repaint();     
                            break;    
        case KeyEvent.VK_UP:y-=10;
                              if(y>=490)
                                 y=0;
                              else if(y<=0)
                              y=490;     
                   repaint();
                            break;    
       default:keyChar=ep.getKeyChar();
    public  synchronized void run()
    while(true)
         repaint();
       try
            t.sleep((int)(Math.random()*200));
       catch(InterruptedException e1)
           e1.printStackTrace();
    public void keyReleased(KeyEvent er)
       System.out.println("released");
    public void keyTyped(KeyEvent er)
       System.out.println("Typed");
    public void mouseClicked(MouseEvent me)
      int m=me.getX();
      int p=me.getY();
       showStatus("X coordinate is:"+m+"Y coordinate is:"+p);
    public void mouseMoved(MouseEvent mp)
    public void mouseDragged(MouseEvent mn)
    public void mousePressed(MouseEvent mr)
    public void mouseReleased(MouseEvent mc)
    public void mouseExited(MouseEvent ma)
    public void mouseEntered(MouseEvent ml)
    we are trying to implement the game where the big arc controlled by the keyboard is gobbyling up
    the smaller circles,but we are unable to run this program
    regards,
    Jack

    It would be better if you posted this in one of the GUI forums.
    Those forums are for addressing programming problems related to general java issues. Which is what you have.
    Also +"unable to run this program"+ doesn't explain the problem unless you don't know what appletviewer is.

  • HELP!!! - Can the ClientHandler class send the client a file to .....

    Can the ClientHandler class send the client a file to a specific location on the client's PC[e.g. c:\games\folder1] ?

    What's the definition of your ClientHandler class?
    You can send any file you want to a machine that supports a server that is able to write the files. Its all up to the target machine what it will allow you to do. Is your target machine running an FTP server? If so you can use the URL class to send files to it.
    Did you check out the Tivoli Remote Control application I suggested on your earlier thread?

  • Clue the game (design)

    Need help designing the classes for this game,for my object oriented course. Could anyone help please.
    I designed my deck 3 object arrays for sospicious,room and weapon.
    Another class for player and one other for game.
    What else should i use.

    first of all, to end this discussion, Clue is Cluedo. It's the same game, it only has different names in different countries. I know it as Cluedo in Belgium and Germany, my wife who is American knows it as Clue. Perhaps if this thread continues long enough, a Chinese programmer will come forward claiming that he played the same game during his yought as 'Mystery of the temple of Yi' or such...
    (And for the Pratchet fans amongst you, The gods of Diskworld seem to play the same game too, under yet another name. See the opening pages of 'Interesting times')
    But now to the original question.
    The first choice would be: Clue/Cluedo is a multiplayer game. To make it interesting you even need four players at least. Two players won't just cut the job. So how do you play this on one computer? Online game? AI adversaries? Server game with combination of real-time players and AI's? Each of this choices has different implications as to the design of the game.
    Apart from that however the design is quite straightforward and will become appearant as you walk through the rules step by step:
    => There are a number of CARDS, devided into 3 categories: weapons, suspects and rooms. The cards are devided amongst the players, so each one receives a DECK of them. Then there are two special decks:
    - the 'MYSTERY DECK' contains one weapon, one suspect and one room. These are the cards the players have to guess
    - the 'LEFTOVER DECK' contains the (0 - palyers-1) cards left over as every player gets an equal number of cards. This deck is open for all to see
    => There is the one and only gameboard upon which the players may move their PAWNS. For reasons of singularity, you can merge the gameboard with the 'game turn manager' into one master class GAME that oversees the board and the players, gives each player its turn and manages the position of the PAWNS on the board until one player is declared winner.
    => Every player has one PAWN, but there will be more pawns then players.
    pawns can:
    - being instructed by their PLAYER to move across the board, enter a room, exit a room (we'll get to the specific mechanics of that in a later stage). Pawns that aren't claimed by a player will not do this of course.
    - Being summoned into a room
    As a pawn represents a figure on the screen as well as a card naming this figure, I suggest to make a pawn a special subclass of card
    => then there are the PLAYERS:
    - each player has a DECK of cards. A player can see the cards of his own deck and the ones of the LEFTOVER DECK but not the decks of the other players and certainly not the MYSTERY DECK
    - each player has a PAWN he can move.
    At the beginning of his turn:
    - the player moves his pawn
    # If the player enters a new room, he can call an 'accusation', naming a suspect pawn and a murder weapon. (Implicitly he also names a room, which happens to be the room he is in.)
    - The pawn of the suspect is summoned to the room he is in.
    - If the room, weapon and suspect match the cards in the MYSTERY DECK, the player is declared winner.
    - if not, he must withdraw from the game.
    # if the player enters a new room he can call a 'suspicion' naming a suspect pawn and a murder weapon. (Implicitly he also names a room, which happens to be the room he is in.)
    - The pawn of the suspect is summoned into the room he is in. Then starting from the player next to him:
    + if the other player has EXACTLY ONE of the cards, he will automatically show this card to the asking player
    + if he has MORE THEN ONE of the cards, he may choose which one to show
    + if he has NONE of the cards, he signals 'no objection' and the questioning passes on to the next player. until either
    # this player has one or more of the cards
    # the turn passes back to the original player
    Putting everything together we have:
    => the GAME class
    - containing the gameboard,
    - managing the rules for moving, entering and exiting rooms
    - managing the PLAYERS, assigning turns to them
    - managing the LEFTOVER DECK and the MYSTERY DECK
    => the CARD class, containing the following subclasses:
    - WEAPON CARDS: Just carrying the name of the weapon. (As this is nothing special, we can skip this class and threat a weapon as a base class card)
    - ROOM CARDS: Next to being cards, these are also linked to one or several positions on the gameboard. Again, as there will be a link from the gameboard to the room, but none from the room to the board, you can find some way to skip this classes and threat rooms as a base class card)
    - SUSPECT CARDS: assigned to a position on the screen (a room or a position in the halways). Some suspect cards can be claimed by a player who then plays this person.
    => the DECK class: a deck contains several cards. Again three subclasses arise:
    - PLAYER DECKS: visible only to the player that has them
    - MYSTERY DECK: invisible to all, contains exactly one ROOM CARD, one SUSPECT CARD and one WEAPON CARD.
    - LEFTOVER DECK: visible to all
    => the PLAYER class
    - contains (reference to) one SUSPECT CARD/player piece
    - contains one DECK of cards
    - can MOVE a selected number of fields, enter/exit a room
    - can call an 'accusation' to the MYSTERY DECK
    - can call a 'suspicion' to all fellow players
    - can answer a 'suspicion':
    # automatically, when none of his cards matches the suspicion cards, send back a 'no objection' message and pass the suspicion on to the next player.
    # automatically, when just one of his cards matches the suspicion cards, show this card to the current player
    # manual, when several of his cards match the suspicion, choose the card to show to the current player.
    'Niklas

  • At first I was using my father's icloud account in my iPad and now I use mine. I still have the games that I have been playing for over a year like that itself but when I clicked the upgrade button they r asking for my father's iCloud pass.how 2 upda

    i am using an iPad mini and I had been using my father's iCloud account to purchase apps in app store and now I changed the iCloud account to mine. But the apps still remain purchased in my father's account and not in mine. Now I have to update my apps to use them(I have been using it for over a year) when I click update button they r asking for the passcode of my father's account. So I can't update it. And I also need to update it. What can I do! How can I purchase the same game with the same progress in my iCloud account.

    Yes, if you repurchase it you may lose your progress. The exception would be a game that stored all your progress on a server under your ID
    If you want to retain your progress you have two choices:
    1. Don't apply the update.
    2. Use your fathers account password to update the game.

  • I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    There probably is, but it requires that you be able to use punctuation and write in sentences so that we can understand exactly what you want.
    You can block others from using your Apple ID by changing your password.  There is no way to erase what was already downloaded on to someone else's device, for obvious reasons,

  • HT1688 I used a MC $50 Giftcard for the iTunes one day. It was supposed to update the games, and other apps on my phone. Only, it wouldn't go through, the credit card was declined. Still, I was charged 4 times. How do I get this back??

    To Whom It May Concern:
    I bought a Mastercard Giftcard for $50 the other day. It was only because the games needed updating before I could play them again, and my card on file had expired.
    I kept getting a message stating the the card was declined. Also, it kept telling me to try to put in another card, or different form of payment.
    I tried several times to get the MC to go through, and it didn't. It was not even showing that the card info even updated!
    When I went to check the amount of the giftcard, there were 4 pending charges of $10.89 on it.
    How do I get this money back? Please let me know as soon as possible.
    Sincerely,
    Queenie from Texas

    I did but that was from a month before, I want pics I took after that backup time. It deleted without my consent like this is not cool. I had recent pics from my trip.

  • How do you get your old scores on your games when you transfer the games between devices ive signed into game center and my scores are there but when I open the games Im at 0 again

    how do you get your old scores on your games when you transfer the games between devices ive signed into game center and my scores are there but when I open the games Im at 0 again

    Did you do this?
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • HT204088 Hi team can your team send me the purchase record of the game barcode soccer

    Hi team
    Can your team send me back the purchase record for the game barcode soccer that I purchase under this account thanks

    This is a User to User Forum... What do you require and from whom...

  • After updating to windows 8.1 the games I played wont start

    Good day,
    Im new to this stuff, i recently updated my windows 8 to 8.1. After updating the game that i was playing works just fine. After a few minutes an update was done on something(i dont know what that was) Then I closed the game becuase it froze or something.
    then when i open it again, it says " Rome: Total War failed to find DirectX 9, which is required for the game to run. Please reinstall directx"
    After that I tried to open another game that i was playing (The Asian Dynasties:Age of empire 3). A window pops up and says
    "Age of Empires III requires at least a 64 MB video card. This computer appears to have a 0 MB video card. If you wish to upgrade your computer, please contact your computer manufacturer for any necessary assistance.
    System information: 1900 MHz, 3968 MB, 0 MB  (vendorID 8086, deviceID 166)"
    There where two choices buttons in the window one says "attempt to run" and the other says "exit game"
     So i selected attempt to run then it says that "Initialization failed. Direct 3d initialization failed" and there list of possible causes to it.
    These two games work perfectly fine before i updated my laptop to windows 8.1. I tried measures to correct the problem on Rome total war like installing a directx package which it said to have installed previous versions of directx's but the game wont still
    work. i also tried troubleshooting it all it does is change its compatibility then it still says that directx 9 is missing. i read more furoms but i cant find a right answer.
    please help,
    JC

    Hi,
    In your situation, I think you should make sure that you have the latest version of the Age of Empires III software, just as the article talks about:
    http://support.microsoft.com/kb/907881
    Besides, after upgrade to Windows 8.1, I suggest to upgrade the graphic card driver accordingly from the official site of graphic card manufacturer. Meanwhile, download the DirectX End-User Runtime Web Installer(also for Windows 8.1) from the site below:
    http://www.microsoft.com/en-us/download/details.aspx?id=35
    The Microsoft DirectX® End-User Runtime provides updates to 9.0c and previous versions of DirectX — the core Windows® technology that drives high-speed multimedia and games on the PC.
    Regards
    Wade Liu
    TechNet Community Support

Maybe you are looking for

  • Tax Procedures and MM pricing procedures

    Currently when creating a PO under the invoice tab you can input the Tax code and jurisdiction code. The tax code I am using is set up for a Canadian Tax procedure (TAXCAJ). The procedure is calling two tax condition types JC1E (GST) and JC1I (PST).

  • How do I get rid of this malware? Please help...

    At least I think it's malware. I realized last night that there were an awful amount of ads, pop-up windows, and warnings coming from my normally visited sites. This only happens on Google Chrome (does not happen on Firefox and Safari) So I ran Sopho

  • Mac Book Connectivity with TV

    I used th Mini DVI-VGA adaptor, connected computer to TV. My desktop picture and the Dock appear on the TV screen, the mouse I see on my TV screen, but when I click on an application (iMOVIE) it does not open. I had to disconnect the computer from th

  • MRP & PO confirmation process

    We have material setup for MRP type VB. An initial purchase req was created when on hand stock fell below the minimum. The purchase req was converted to a PO and sent to the supplier. The supplier responded with an order confirmation with a different

  • How to get the project path ?

    In my servlet, how do I get the project path ? I have the following dir structure : Web_App   + build     lib   + nbproject   + src     test   + web ( index.jsp , my.jsp , my.html )     + Dir_Docs ( my file : ABC.txt ) My Servlet is : public class My