Checkers board game - any feedback?

Checkers was the first program I wrote in Java nearly 15 years ago. It played OK but looked very dated so I recently rewrote it and this is the result:

Checkers game

Any feedback or opinions welcome.

Mike

2hard :-\

change the level (1=easiest 9=very hard) :slight_smile:
or were you on 1? in which case I need to make it easier.
PS Thx for trying it out though

Works good

I wouldn’t mind a

  1. Real Rules vs Casual Rules.
    I know a lot of people who play casual rules as “you don’t HAVE to jump at every opportunity”

  2. click to drag checker piece. Instead of 2 single clicks, perhaps a click/drag/release (while holding the piece in hand)

  1. I’ll have a think about that - there are actually loads of weird checkers rules around the world and it might be interesting having tick boxes to select them. Obviously this would present a more complicated interface though which might put people off. I remember having a game in a market in the Sahara desert against the local champ - I was still being taught interesting new rules at the end of the game!

  2. I’ll add that if I can work out how to do it.

Thx for your feedback

why not create an advanced interface? that way it doesn’t clutter things or scare off people.



Exception in thread "AWT-EventQueue-2" java.lang.ArrayIndexOutOfBoundsException: -4
	at diamond_v55.TakeOffJump(diamond_v55.java:3107)
	at diamond_v55.TakeOffWholeMove(diamond_v55.java:2733)
	at diamond_v55.HumanError(diamond_v55.java:3129)
	at diamond_v55.mousePressed(diamond_v55.java:3405)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: -22
	at diamond_v55.TakeOffJump(diamond_v55.java:3107)
	at diamond_v55.TryAllJumps(diamond_v55.java:2358)
	at diamond_v55.FindBestMove(diamond_v55.java:2259)
	at diamond_v55.FindBestMove(diamond_v55.java:2300)
	at diamond_v55.FindBestMove(diamond_v55.java:2233)
	at diamond_v55.PlayCompMove(diamond_v55.java:1559)
	at diamond_v55.run(diamond_v55.java:770)
	at java.lang.Thread.run(Unknown Source)

Hmmmmmmmm I got this and the game froze after I made 1 move.

Oh dear :’(
Can you repeat that error?
Or does this happen every time you try to run it?
What version of Java and type of OS are you running?

I’ve changed the levels to give people more of a chance. I guess most players will be wanting to play in the lower levels anyway so this does make a lot of sense. Any chance you could try it again and see if you can beat any of the levels 1-3?

You can now drag and drop pieces and this does seem more intuitive.

@mike_bike_kite
No that only happened the first time I ran. All subsequent tries were normal and the computer beat me every time :stuck_out_tongue:
I believe I was clicking all the over the place randomly since it wouldn’t let me move then I checked the console and I got that exception.

Did you try changing the level?
Did you realise you could change the level?
I’ve just altered the levels to make it a bit more beatable.

I went for a graphic style of interface (ie to change level) as I think they’re more fun but if it doesn’t work then maybe I should go for something more mundane.

Yeah I knew there were levels. I clicked on the “3” and changed it to “1” and the computer still beat me! :stuck_out_tongue:

I’ve added extra levels to my checkers applet which people can hopefully beat. Once the levels get above 6 and it starts using all it’s AI then it will still be difficult to beat even though it will only be thinking for a second or two. You can drag and drop etc. There are sound effects on winning and loosing. You can also alter the look of the pieces but I’m not sure how to make this obvious (suggestions?.

I need to think how to add the alternative rules ie :

  • jumps are optional
  • flying kings
  • men can jump backwards

I’d also like to have a better end game database and make the program into an application where it stores it’s state each time.

I’d appreciate feedback on the new levels - is it possible to beat now? and of course if anyone has more suggestions then I’ll add them to my list.

Mike

I played the standard level (5?). Way too easy, even without understanding the rules. Maybe you should start with 6. And I’m used to international draughts rules, that is multiple jumps, and capture backwards. Would make it more interesting. I like the easy interface though, works fine.

[quote]Way too easy
[/quote]
Problem is many people found the old levels way too hard so I have to guess what the average player strength is and then pitch it for them. Could you beat it on level 7? It should only take a second or so to think but it should play much more powerfully. It plays English draughts / American checkers so multiple jumps are fine. I will be adding the options I mentioned in my previous post so hopefully that will suit you better. Thx for trying it out.

Draw. I guess it doesn’t make mistakes in the end. We were repeating moves :slight_smile:

Done quite a bit of work to it!

  • Can now alter the rules ie
    [list]
    [li]optional jumps
  • flying kings
  • men can jump backwards
    [/li]
  • Interface has been improved
  • a few sounds added
  • It’s easier to beat on the lower levels now so if you’re very good you’ll need to alter the level to 7 and above.
  • You can change the board appearance
  • you can change the playing pieces
    [/list]

Feedback, as ever, is appreciated.

Although this would add another huge element to the game, it might be a fun challenge just for practice.

For the sake of practicing/learning

make your game connect with a server and have it send scores of difficulty and win/loss

Then based upon, have it dynamically or manually adjust the difficulty so that 1 easiest is easy enough to win 95% of the time, medium 5 is won 60% of time and hard 9 is won 5% of time.

So if too many people are winning medum 5, scale either position 5 or the whole thing to be scaled/stretched/distorted for adjusted difficulty. Keep adjusting so that eventually you will have an excellently balanced game.

Given you have this kind of control over difficulty.

It would be interesting to do but I suspect it would be hard work. It might be easier to interface to a standard draughts server (assuming there are such things) and then let it play other ranked humans until it found a ranking for each level - this would relate to what percentage of people could beat it. I’m not sure it would be worth the effort though - it plays reasonably but it’s meant as a fun interface to a fun game rather than being the next deep blue.

I did think about allowing it to play other people but decided against that for the same reason.