Skip to content

Go package for simulating the movements of a character.

License

Notifications You must be signed in to change notification settings

renanbastos93/gophermoves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gopher Moves

GopherMoves is a Go package that provides an interface and an example implementation for simulating the movements of a character, particularly designed for a Gopher character.

Demo.mov

Table of Contents

Installation

To use GopherMoves in your Go project, you can simply run:

go get -u github.com/renanbastos93/gophermoves

Usage

package main

import "github.com/renanbastos93/gophermoves"

func main() {
	orderMatrix := 5
	g := gophermoves.New(orderMatrix)
	err := g.Start()
	if err != nil {
		panic(err.Error())
	}
}

Interface Methods

The GopherMoves interface provides the following methods:

  • Start() (err error): Initiates movements for the character.
  • Reset(): Redefines the default states of the X and Y positions.
  • Up(): Moves the character upward.
  • Down(): Moves the character downward.
  • Left(): Turns the character to the left.
  • Right(): Turns the character to the right.

Contributing

Feel free to contribute to this project. If you find any issues or have suggestions, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Go package for simulating the movements of a character.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages