Skip to content

Commit

Permalink
initialized hint circle + current points based on hints used
Browse files Browse the repository at this point in the history
  • Loading branch information
cathli66 committed Apr 29, 2024
1 parent aaf92e1 commit 1a04547
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions game/lib/gameplay/gameplay_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class _GameplayMapState extends State<GameplayMap> {
int numHintsLeft = 10;
GeoPoint? startingHintCenter;
GeoPoint? hintCenter;
double defaultHintRadius = 100.0;
double defaultHintRadius = 200.0;
double? hintRadius;

// whether the picture is expanded over the map
Expand Down Expand Up @@ -97,13 +97,15 @@ class _GameplayMapState extends State<GameplayMap> {
* hints used for this challenge already.
*/
void setStartingHintCircle() {
print(widget.startingHintsUsed);
hintRadius = defaultHintRadius -
(defaultHintRadius - widget.awardingRadius) *
0.33 *
(totalHints - widget.startingHintsUsed);
widget.startingHintsUsed;
if (hintRadius == null) {
hintRadius = defaultHintRadius;
}
print(hintRadius);

Random _random = Random();

Expand Down
13 changes: 9 additions & 4 deletions game/lib/gameplay/gameplay_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class _GameplayPageState extends State<GameplayPage> {
challenge.location] ??
""),
style: TextStyle(
fontSize: 12,
fontSize: 13,
color: Color(0xFF835A7C)))
]),
Row(children: [
Expand All @@ -201,19 +201,24 @@ class _GameplayPageState extends State<GameplayPage> {
: "?.?") +
' Miles Away',
style: TextStyle(
fontSize: 12,
fontSize: 13,
color: Color(0xFF58B171)))
]),
Row(children: [
SvgPicture.asset(
"assets/icons/bearcoins.svg"),
Text(
' ' +
((challenge.points ?? 0) -
startingHintsUsed * 25)
.toString() +
'/' +
(challenge.points ?? 0).toString() +
" PTS",
style: TextStyle(
fontSize: 12,
color: Color(0xFFFFC737)))
fontSize: 13,
fontWeight: FontWeight.w500,
color: Color(0xFFC17E19)))
]),
]))
]))),
Expand Down

0 comments on commit 1a04547

Please sign in to comment.