Code Monkey home page Code Monkey logo

2low2high's Introduction

2low2high

Shortest code to make a Too-low — Too-high game

#Game rules:

  1. Computer will choose a random number out of integer range (-32768..32767).
  2. Now you will think of a number and input it.
  3. The computer will tell if your number is lower (TOO LOW) or higher (TOO HIGH) than the chosen number.
  4. When you guess the number, the computer should display Congrats! You found the number!.

#Code rules:

  1. Do not use the characters T, O, L, W, H, I and G (neither lowercase nor uppercase) in string or character literals.
  2. Remove 300 bytes if your code can display the game rules before starting the game.
  3. Remove 50 bytes if your code can count number of turns and display number of turns taken in the end of game.
  4. Remove 25 bytes from your score if your code can tell user that the number you input is out of integer range.
  5. Remove 25 bytes If your code takes the random number not from any built-in random function.
  6. Remove 10 bytes If your code display "congrats" in color (pick any color except default white).

#Score:

  1. CHECK
  2. CHECK, -300
  3. CHECK, -50

232 - 300 - 50 = -118 (without new line)

237 - 300 - 50 = -113 (with new line)

2low2high's People

Watchers

James Cloos avatar  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.