Back to project page polygons.
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.
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); } }