YAPOG  0.0.1
Yet Another Pokemon Online Game
Pokedex.cpp
Go to the documentation of this file.
2 
3 namespace yap
4 {
6  : pokCaught_ ()
7  , pokList_ ()
8  , pokSeen_ ()
9  {
10 
11  }
12 
14  {
15 
16  }
17 
19  {
20  return pokSeen_.Count ();
21  }
23  {
24  return pokCaught_.Count ();
25  }
27  {
28  return pokList_.Count ();
29  }
30 
32  {
33  ID maxID (0);
34  for (PokemonInfo* pok : pokSeen_)
35  {
36  if (pok->GetID () > maxID)
37  maxID = pok->GetID ();
38  }
39 
40  return maxID.GetValue ();
41  }
43  {
44  return *pokSeen_[index];
45  }
46 
48  {
49  if (index < pokList_.Count ())
50  return pokList_[index];
51  else
52  {
53  return nullptr;
54  }
55  }
57  {
58  for (PokemonInfo* pok : pokSeen_)
59  {
60  if (pok->GetID ().GetValue () == ID)
61  return pok;
62  }
63  return nullptr;
64  }
65 
67  {
69  pokList_.Add (pok);
70  }
71 
73  {
75  pokSeen_.Add (pokSeen);
76  }
77 
79  {
81  pokCaught_.Add (pokCaught);
82  }
83 
85  {
86  pokSeen_ = pokSeen;
87  }
88 
90  {
91  pokCaught_ = pokCaught;
92  }
93 
95  {
96  pokList_ = pokList;
97  }
98 
99  void Pokedex::Init ()
100  {
101 
102  }
103 }