Code Monkey home page Code Monkey logo

hangman-java-module-1's Introduction

Hangman Java Game

Welcome to the Hangman Java Bootcamp Capstone Project! This project is designed to challenge your understanding of Java concepts from Module One. Hangman is a word-guessing game where you'll be building a console-based game that keeps the user guessing until they either correctly guess the word or make too many incorrect guesses.

Why Hangman?

  • Challenge: Hangman is a challenging project that will push your programming skills to the next level.
  • Application of Concepts: This project will test your ability to apply concepts learned in Module One of the Java Bootcamp.
  • Creativity and Research: Get creative and do some research. As a developer, it's crucial to practice finding resources online.

Project Structure

Ensure that your capstone project contains the following folders:

  • src: Source code files.
  • resources: Resource files, including the list of words and gallows.

If you're missing any folders, download the updated resources from the GitHub Repo.

Tips Before You Start

  1. Embrace Challenges: Struggling to build Hangman is a positive sign; it means you'll learn a lot by solving it.
  2. Use Breakpoints: When encountering bugs, use breakpoints to identify and fix issues efficiently.
  3. Community Support: Don't hesitate to ask questions in the community; it's a great place for support.

Instructions

As this is your capstone project, instructions are less detailed. They will only provide the task without guiding you toward completing it. Read all instructions before starting your code, and helpful hints are provided at the end.

a) Download the Starter Project

In the Java Bootcamp Resources -> Module 1 -> Capstone Project, find Hangman and open it.

b) Choose a Random Word

Use the provided array of words to choose a random word for the game. Reflect the word's characters with placeholders ('_').

c) Show the Gallows

At every turn, display the gallows using the provided array of gallows.

d) Show Missed Guesses

Keep track of and display every incorrect guess made by the user.

e) Replace Placeholders with Correct Guesses

When the user guesses correctly, replace the matching placeholders.

f) If the User Wins

Stop the game and display a winning message.

g) If the User Loses

Stop the game and display a losing message.

h) Aesthetics

Enhance the visual appeal of your game by following the specified formatting guidelines.

Possible Design and Hints

Hints

  • Look up how to:
    • Convert a String to an array of characters.
    • Get the index of a character in a String.
    • Loop through characters in a String.
    • Check if two arrays are equal to each other.

Possible Design

Consider implementing the following functions:

  • randomWord(): Returns a random word from the list of words.
  • checkGuess(): Returns true if the user guessed a letter from the word correctly.
  • updatePlaceholders(): Updates placeholders when the user makes a correct guess.
  • printPlaceholders(): Prints the placeholders.
  • printMissedGuesses(): Prints guesses that the user missed.

Get Started

Download the starter project, and let the Hangman challenge begin! Good luck, and enjoy building your Hangman game!


Become a Java Web Developer with our Spring Boot Course (86% Sale)

hangman-java-module-1's People

Contributors

1uckyswish 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.