GithubHelp home page GithubHelp logo

tpatil2 / connectx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kbuffardi/connectx

0.0 2.0 0.0 1.03 MB

License: The Unlicense

C++ 85.42% Makefile 0.69% CMake 0.74% M4 0.64% C 0.20% Objective-C 0.23% Python 11.40% Shell 0.67%

connectx's Introduction

Tejas Patil

  • BUG 1

    • In bool ConnectX::inBounds(int w, int h)
      bool ConnectX::inBounds(int w, int h)
      {
      bool inside;
      if( w>=width || w<0 )  
      	inside = false;
      else                          	   
      	inside = true;
      if( h<0 || h>=height )                      
      	inside = false;
      else                           
      	inside = true;
      return inside;
      }
      

    This function checks for given location if it inside board returns 'inside' = true else returns false

    but if input 'w' is out side board it sets value of 'inside' (w>=width || w<0) to false and it checks for input 'h' if its inside board then it sets value of 'inside'=false, but practically given location is out of board. So this function doesn't work properly.

  • BUG 2

    • In ConnectX::ConnectX(int wide, int high, int x)

    If values of wide hign and x are less than or equal to zero then these values are set to Default values

    LINE NO 9: This doesn't consider the case when high with and x are equal to 1 if it accepts 1 then following problems will occure

      - If dimention is det to 1x1 then  only one player can play
      - First player will always win because value of towin is 1
      - second player will never get chance to play.
    
  • BUG 3

    • In function void ConnectX::placePiece(int column)

    for bad input value of column -1 it gives codedump *** Error in `./ConnectXTest': free(): invalid next size (fast): 0x000000000181a5f0 *** Aborted (core dumped)

  • BUG 4

    • ConnectX::ConnectX(8,8,100)

      • this function accepts value of 'towin' greater than the size of board
      • length of 'towin' must be less than or equal to Diagonal length of board

connectx's People

Contributors

tpatil2 avatar kbuffardi avatar

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.