Git Product home page Git Product logo

darthjdg / numguess Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 5.0 170 KB

Number guessing game collection in multiple programming languages

Home Page: http://codebin.co.uk/projects/numguess/

License: GNU General Public License v3.0

Haxe 5.05% Jasmin 14.50% Java 4.35% JavaScript 6.37% C 8.35% C++ 7.12% Pascal 8.18% R 5.62% Awk 3.14% Shell 3.22% C# 3.69% D 3.11% Dart 4.19% F# 3.63% Go 3.73% Lua 3.48% PHP 2.98% Perl 4.10% xBase 2.61% PowerShell 2.58%

numguess's People

Contributors

akapa avatar anemgyenge avatar daroczig avatar darthjdg avatar vbence avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

numguess's Issues

Lua: Max tries calculation is wrong

Something is seriously wrong with Lua. Calculation of the max_tries variable looks ok, the value is still wrong. With a limit of 10 it should be 4, Lua calculates 3.

Tested with Lua for Windows 5.1.4.

Update C versions according to guidelines

  • Output formatting
  • Variable names
  • Ask for player name
  • Default limit to 10 instead of looping
  • Out of range message
  • Custom messages
  • Replay feature
  • Get rid of scanf from cross-platform version

Optimise Haxe version

Move maxTries calculation to right after the limit is set, outside the game loop.

Lua version's first number is always the same

The Lua version seems to generate 6 as the first number with the limit of 10. Following numbers are generated randomly. It happens with the latest Windows interpreter, have to investigate.

Optimise PHP version

Move maxTries calculation out of the game loop. Get rid of the evaluate() function, as it's only called from one place.

Optimise Perl version

Function call might be unnecessary complexity. Fix maxTries variable name and where it's calculated.

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.