Back to project page TileArena.
The source code is released under:
MIT License
If you think the Android project TileArena 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 game.tile.arena.entity.attack; //from www. jav a2s . c o m import java.util.LinkedList; public class AttackList extends LinkedList<Attack> { public Attack getWrap(int index) { return get(getWrapIndex(index)); } public int getWrapIndex(int index) { if (index < 0) return size(); if (index > this.size()-1) return 0; return index; } }