Jump to content

Help with a simple game.

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Ascension

Ascension

    Learning Programmer

  • Members
  • PipPipPip
  • 42 posts
Hi, im making a simple poker game, is this all correctly formatted code so far?


//---------------Poker Card Game----------------\\


//=================|===C#===|===================\\


public enum Card_Suit  //Enumerator declaring the 4 suits. Clubs Diamons Hearts and Spades. Zero_error is a spacer, so that the first suit is equal to '1'

{

	Zero_Error,

	Clubs,

	Diamonds,

	Hearts,

	Spades

}


public enum Card_Value //Enumerator that declares value of cards, Ace, One, Two, Etc. Zero_Error is a spacer as in Card_Suit.

{

	Zero_Error,

	Ace,

	Two,

	Three,

	Four,

	Five,

	Six,

	Seven,

	Eight,

	Nine,

	Ten,

	Jack,

	Queen,

	King

}


public enum players //List of player names.

{

	Mark,

	John,

	Michael,

	Kelly,

	Jackson,

	Daniel,

	Jesse,

	Sam,

	Martin,

	Arnold,

	Lisa

}




class StartGame

{

	System.Console.WriteLine("=====================================");

	player p1;

	player p2;

	player p3;

	

	p1 = rnd.next( 9, 12); // Give names to players.

	p2 = rnd.next( 4, 9);

	p3 = rnd.next( 0, 4);

	

	System.Console.WriteLine("Players are: \n\n\n {0} \n {1} \n {2} \n {3}", first player.p1 player.p2 player.p3 player.p4);

	System.Console.WriteLine("======================================");

}


#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
If it works, then fine. If it doesn't, then tell us what it does do.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
What do you mean correctly formatted code? The format doesn't matter as long as the syntax is correct. Although it looks correct. However, Doesn't your start game method need a main method?

#4
Ascension

Ascension

    Learning Programmer

  • Members
  • PipPipPip
  • 42 posts
Yes this is not the whole program.

Would this be that way I would up a poker game?