Android Open Source - polygons Figure Generator






From Project

Back to project page polygons.

License

The source code is released under:

GNU General Public License

If you think the Android project polygons listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.github.polygons.logic;
//from  w  w w  .  jav  a  2 s . c  o m
import android.content.Context;

import com.github.polygons.figures.Figure;

/**
 * Created by Marta on 18/11/2013.
 */
public class FigureGenerator {

    private static int figuresNum = 3;

    public static Figure createChallengeFigure(Context context){
        int idRandom = (int)(Math.random() * figuresNum);

        Keeper.getInstance().addFigureId(idRandom);

        return Figure.createFigure(idRandom, context);
    }

    public static Figure newFigure(Context context){
     int idRandom = (int)(Math.random() * figuresNum);
        return Figure.createFigure(idRandom, context);
    }
}




Java Source Code List

com.github.polygons.FigureListActivity.java
com.github.polygons.GameActivity.java
com.github.polygons.LevelActivity.java
com.github.polygons.LostActivity.java
com.github.polygons.MainActivity.java
com.github.polygons.figures.Figure.java
com.github.polygons.figures.Oval.java
com.github.polygons.figures.Square.java
com.github.polygons.figures.Triangle.java
com.github.polygons.logic.CustomAudioManager.java
com.github.polygons.logic.FigureGenerator.java
com.github.polygons.logic.Keeper.java
com.google.example.games.basegameutils.BaseGameActivity.java
com.google.example.games.basegameutils.GameHelper.java