• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to start a slot machine project

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, my name is Leon and im currently learning programming in school. Im not the best at it and i could need some help of you guys if you are willing to help.
We need to create a game with the GUI and my partner and i decided that we wanted to create a slot mashine. As i said we just know the basics and just recently learned exceptions and how to use them.

I dont want a complete code since we have to do a code review when we are finished, i just some advice on how to start this project and how to turn my ideas into something useful which i can use in my program.



Have a nice day guys.
 
Marshal
Posts: 79177
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

I have some suggestions:-
  • 1: Turn your computer off. Write down on paper, without using any computer‑specific words, what you want the game or machine to do.
  • 2: Don't write any GUI code until you have the game working at the command line. The game shou‍ld work without a GUI.
  • Is this the sort of machine you are trying to emulate?
     
    Ranch Hand
    Posts: 93
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I made a tic-tac-toe gui years ago.  Try googling "tic tac toe java".  That should get you started.
     
    Leon Haas
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Campbell Ritchie wrote:Welcome to the Ranch
    . . . Is this the sort of machine you are trying to emulate?





    Thanks for the advice. Yes this is the mashine i am trying to emulate.

     
    lowercase baba
    Posts: 13089
    67
    Chrome Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The hardest thing to learn is to separate responsibilities. it's better to have a bunch of methods that each do one small thing, than one monolithic method that does <everything>.

    remember to reuse code.  For example, you don't need three methods to generate the values on the three wheels...you need one method, and then you call it three times.  So you may have a method "getSpinResult", and it calls "getSingleWheelResult" three times.

    Compile and test your code about 100x more often than you think you should.

    Spend 90% of your time THINKING, and only 10% of your time TYPING.  I'd probably spend a day or two thinking about what my program needs to do, and how i'd break it all down, before I wrote a single line of code.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic