Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (407)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  AI for a card game  (Read 2683 times)
0 Members and 1 Guest are viewing this topic.
Offline Bonbon-Chan

JGO Coder


Medals: 12



« Posted 2009-02-05 09:32:00 »

Hi,

I'm on a card game ("la belote coinchée"), I have done most of the UI and functionalities. Now, I'm working on the AI.

There is to step by game :
- bet ("mise") : I made some functions for the card in hand. It works not too bad but it doesn't take in account other bet.
- play : I start to put a set of rules but it beging to be awfully complicated without having a real strategy...

I will take any advice/tips that will help me  Wink


(The game is only in french right now but it is not too difficult to understand)

How to play (quickly explained  Tongue) :
"Mise" : one after another play do a bet. If you don't want to put any, just pass ("passe"). When someone bet, he must put a higher bet (step of 10). When someone bet, he give a color that will be the trump ("atout"). Bet ends when noone put a higher bet. ("capote" and "coinche" not working right now)

Bonus :
- If you have 3 following cards +30 points
- If you have 4 following cards +50 points
- If you have 5 following cards +100 points
- If you have 4 queens, 4 kings, 4 10, 4 aces +100 points
- If you have 4 9 +180 points
- If you have 4 V +200 points

If you have the queen and the king of the trump card, +20 points (not in game yet, you have to say "belote" and "rebelote" when you play thoses cards)

"Play": the order of the cards are from weakest to strongest : 7, 8, 9, V, D, R ,10, 1
and for trump card : 7,8, D,R,10, 1, 9, V
You must put a card that is the same color than the first card.
If you don't have the color, you must put a trump card (and you get cards if no one else put a higher trump card).
If you don't have the color and your partner has put the hight card, you can put any card you like.
If the fist card is trump color, you must put a higher trump card (if you can't put any other trump card).
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (97 views)
2013-05-17 12:29:12

alaslipknot (105 views)
2013-05-16 12:24:48

gouessej (135 views)
2013-05-15 15:53:38

gouessej (130 views)
2013-05-15 15:17:58

theagentd (141 views)
2013-05-15 06:01:13

theagentd (128 views)
2013-05-15 06:00:54

StreetDoggy (171 views)
2013-05-14 06:56:26

kutucuk (192 views)
2013-05-12 08:10:36

kutucuk (195 views)
2013-05-12 06:36:09

UnluckyDevil (201 views)
2013-05-11 20:09:57
Complex number cookbook
by Roquen
2013-04-24 03:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 07:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 07:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 07:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 08:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 07:17:38

Java Data structures
by Roquen
2013-03-29 04:21:12

Topic Request
by kutucuk
2013-03-22 12:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.089 seconds with 21 queries.