Git Product home page Git Product logo

tictactoeincpp_task1's Introduction

Axel Vanherle

Check out my website.

tictactoeincpp_task1's People

Contributors

axelvanherle avatar brentgg avatar indy2013 avatar nathanbruggeman avatar

Watchers

 avatar

tictactoeincpp_task1's Issues

Files_Missing

Ik zie dat je alleen maar een aiplayer.h, humanplayer.h en player.h files hebt meer geen .cpp voor deze...
Klopt dit?

Name cannot have spacebar

Issue description

When there is a spacebar in the name it will only use the first part.

Steps to reproduce the issue

  1. Compile and run code (via qt)
  2. fill in name

What's the expected result?

  • 2 names split with spacebar

What's the actual result?

  • only first part of the names

Program is unable to handle string input when choosing human or AI.

Describe the bug
When choosing between a human or AI player, if the user inputs one or more non-numerical characters the program becomes unresponsive.

To Reproduce

  1. Run the game.
  2. Type one or more non-numerical characters.

Expected behavior
The program should handle the unexpected input and either ask for the input again, or continue otherwise.

Actual behavior
The program becomes unresponsive and seems to be in a loop of clearing and printing on the console.

Selecting the same char causes a problem.

Ik run het progamma met QT Creator 6.3.2 met de MinGW 11.2.0 64-bit for C++ compiler.

Ik startte een game, selecteerde voor speler1 "Human", gaf mijn naam in en moest ten slotte een char ingeven waarmee ik wil spelen. Ik gaf voor deze char de letter "z" in. Als 2de speler kies ik nog eens "Human" en gaf weer een naam in. Nu koos ik voor speler2 dezelfde char om mee te spelen. Beide spelers hebben nu het character "z" geslecteerd. De game game runt nu.

Het programma ziet de char "z" die speler1 heeft ingezet als dezelfde char van speler2 en visa versa. Je wint het spel als je 3 keer op een rij dezelfde char hebt staan. Doordat beide spelers dezelfde char hebben gaat het spel een winnaar aangeven als er 3keer dezelfde char staat, ookal staan er 3 op een rij waarvan er 2 chars van speler1 zijn en 1 char van speler2. De speler die de 3de char op een rij kan zetten wordt aangeven als da winnaar. Dit zou niet mogen omdat het 2 afzonderlijke spelers zijn en de chars van speler1 niet zouden mogen tellen voor speler2 en andersom. Dezelfde speler zou 3keer zijn char op een rij moeten hebben die hijzelf geplaatst heeft.

Dit kan opgelost worden door de ingegeven char van speler2 te checken op een gelijkenis met de char van speler1. Wanneer deze hetzelfde zouden zijn moet het programma dit aangeven, zeggen dat dit niet kan en vragen om een andere char in te geven welke speler1 niet gerbuikt.

image

image

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.