Skip to content

ant-mejia/dots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.Dots.

Screenshot

Description

I wanted to create a simple game that doesn't require any instructions and can be enjoyed by all ages.

Using the newest syntax of Javascript, I created a Level class object of their own, looping in the keyboard element in a method of that object.

class Level {
  constructor(num) {
    this.level = num;
    this.bgColor = "#000000".replace(/0/g, function() {
      return ((Math.random() * 16)).toString(16);
    });
  }
  render() {
    game.updateText(this.level);
    game.changeBackground(this.bgColor);
  }
  updateCircle() {
    $('.mini-circle-wrapper').velocity('transition.fadeOut', {
      complete: function() {
        $(this).css('transform', 'rotateZ(' + Math.floor(Math.random() * 360) + '48deg)').velocity('transition.fadeIn');
      }
    });

  }
}

I also made all of my game-relevent functions as methods in my game object which holds the game state.

Built With

Author

Anthony Mejia

Acknowledgments

My awesome squad leader Vince for helping me keep my head above water.

About

This is my game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors