All Projects → thiagokimo → GameOfLifeView

thiagokimo / GameOfLifeView

Licence: Apache-2.0 license
A simple Android view that displays Conway's Game of Life. I've learnt the principles of TDD doing this

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to GameOfLifeView

coolrs
CoolRs is a collection of Android Renderscript effects.
Stars: ✭ 41 (+105%)
Mutual labels:  game-of-life, conway
cgol
Conway's Game of Life in the Terminal
Stars: ✭ 32 (+60%)
Mutual labels:  game-of-life, conway
crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (+10%)
Mutual labels:  view
goltorus
Game of Life on the surface of a torus.
Stars: ✭ 49 (+145%)
Mutual labels:  game-of-life
nuts
Nuts and bolts for building cross-platform UI (HTML, Flutter, CLI) using Dart. Also screw frameworks (React, Vue, Angular).
Stars: ✭ 12 (-40%)
Mutual labels:  view
IndicatorView
IndicatorView Library For Android
Stars: ✭ 41 (+105%)
Mutual labels:  view
Hyena
鬣狗快速开发库(2018年6月停止维护)
Stars: ✭ 21 (+5%)
Mutual labels:  view
cursive-tabs
Tabs for gyscos/cursive views 🖥️
Stars: ✭ 21 (+5%)
Mutual labels:  view
CoolView
一些炫酷的自定义控件(Some cool custom controls),逐步完善中...
Stars: ✭ 63 (+215%)
Mutual labels:  view
Custom-Grid-View
Custom Drag and Drop Grid for Home Assistant
Stars: ✭ 103 (+415%)
Mutual labels:  view
MultiPartProgressbar
A progressbar which contains different parts of progress.
Stars: ✭ 15 (-25%)
Mutual labels:  view
LovelyView
🔗A view that combines pictures and texts.(一个组合图片和文本的view).
Stars: ✭ 68 (+240%)
Mutual labels:  view
SwiftyWave
Siri Waves View in Swift
Stars: ✭ 66 (+230%)
Mutual labels:  view
cellular-automata-explorer
(WIP) An interactive web app for exploring cellular automata.
Stars: ✭ 18 (-10%)
Mutual labels:  game-of-life
shtm
No description or website provided.
Stars: ✭ 21 (+5%)
Mutual labels:  view
MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (+55%)
Mutual labels:  view
drag-to-close
Android library that provides a view group which allows to finish an activity by dragging a view.
Stars: ✭ 69 (+245%)
Mutual labels:  view
AndroidSamples
Android例子----View、指纹、Canvas、RecyclerView、BottomSheet、PopupWindow、Broadcast、Service、Rxjava、Retrofit、Handler等
Stars: ✭ 107 (+435%)
Mutual labels:  view
Observable
A generic ObservableObject for every property!
Stars: ✭ 41 (+105%)
Mutual labels:  view
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (+75%)
Mutual labels:  view

GameOfLifeView

Android Arsenal

This is a custom Android view which displays Conway's Game of Life. I've done to display the results of my learnings of Test Driven Development.

Screenshot Screenshot

Setup

Gradle:

dependencies {
    compile 'com.github.thiagokimo:gameoflifeview:1.0.2'
}

Maven:

<dependency>
    <groupId>com.github.thiagokimo</groupId>
    <artifactId>gameoflifeview</artifactId>
    <version>1.0.2</version>
</dependency>

Usage

Through XML

<io.kimo.gameoflifeview.view.GameOfLifeView
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  game_of_life_view:proportion="20"
  game_of_life_view:aliveCellColor="#FF0000"
  game_of_life_view:deadCellColor="#0000FF"/>

Through Code

Initialize the view:

@Override 
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  gameOfLifeView = new GameOfLifeView(this);
  gameOfLifeView.setProportion(20);
  gameOfLifeView.setDeadColor(Color.RED);
  gameOfLifeView.setAliveColor(Color.BLUE);
  setContentView(gameOfLifeView);
}

...and run the game with:

  gameOfLifeView.begin();

Custom params

From now you can customize the attributes:

  • Proportion: The value which the view will use to calculate the cell size and the number of columns and rows the game will have.
  • Colors: Dead and alive cells can have any given color.

License

Copyright 2011, 2012 Thiago Rocha

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].