Giter Site home page Giter Site logo

whack-a-mole-game's Introduction

Whack-a-mole-game

Designed a whack-a-mole game in verilog HDL using BASYS 2

So in this project we wanted to make a whack-a-mole game. We had to randomly light LEDs and press the buttons to get score points. For example, when 2nd LED is on if player presses 2nd button he will take score point and otherwise he will lose one point.

In order to do this, first i made a random number generator that will create a 4-bit random number. Then we light LEDs according to this number. For example, if the random number is 1011, first, second and fourth LEDs will light. After that, I designed a button detector to prevent any bouncing problems. Because when the player presses the button it bounces and gives more than 1 input. This button detectors will prevent that. Then, I designed a score counter that will give 8-bit as an output score and add 1 or substract 1 from it. After that, I created a binary to bcd converter that will take this 8-bit score and convert it to 12-bit bcd number. For example if the number 123(1111011) it gives (0001)(0010)(0011) which is equal to 1-2-3 respectively. Then I desing a 7-segment displayer that will display this 12-bit number.

I didn't explicitly explain in here but there is comment lines in every file that you can look. Also I didn't upload the whole project folder because there were some bmm,prj,stx and test files that I found unnecessary to share in here. So I only uploaded code files.

whack-a-mole-game's People

Contributors

etemeskutceo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.