Iterable CardList
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Iterable CardList
by eugenrivniy » 20 Sep 2009, 21:14
Hi. I think that if CardList will be iterable, it be more usefull, because we can use easy-to-use 'foreach' instead of complex'for (...)'.
Patch attached.
Patch attached.
- Code: Select all
3c3
< public class CardList
---
> public class CardList implements Iterable<Card>
208a209,213
>
> @Override
> public Iterator<Card> iterator() {
> return list.iterator();
> }
- eugenrivniy
- Posts: 6
- Joined: 20 Sep 2009, 21:02
- Has thanked: 0 time
- Been thanked: 1 time
Re: Iterable CardList
by DennisBergkamp » 21 Sep 2009, 00:50
Cool, I've changed this for the next version, thanks
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 93 guests