Giter Club home page Giter Club logo

snakewent's Introduction

Screenshot

SnakeWent

This Project is a Portfolio one, implementing a basic Golang version of the Snake game on the command line.

The other Arthur helped me with the go mod init, this was my first golang code, so don't notice it kindda SUCKS. hahaha

⚠️ Disclaimer: This go code is not supposed to behave like the above. it is a gif of the older game

Alt Text

⚠️ Disclaimer: This go code and doesn't have unit testing, this was my very first go project.

Running

git clone https://github.com/afa7789/SnakeWent

cd SnakerWent

possible to be runned with or without the flags, without it you will be running with default size.

go run main.go --width=20 --height=10

About

This was made with the objective of showing capabilities of encapsulating and reutilization of code. So this don't have the best performance needed. And more, the way the input works was asked as the way it is, afteall this code is for a challenge made and this was one of the requisites of it.

the package:

  • printer: is a package exclusively to use fmt, so i could showcase the encapsulation of it.
  • gamestruct: it's the game structs ( node, gamestate, position) struct and builder functions
  • boardlogic: it's functions to fill the 2d Array with it's ints
  • gamelogic: it's gamelogic functions, you know , when it eats, increase snake, wall hit, round iteration,etc.
  • gamedrive: it's the game start function
  • receiveInput: it's a encapsullation of the keyboard reading to get arrow keys to work on this.

snakewent's People

Contributors

afa7789 avatar arthur404dev avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

arthur404dev

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.