feat: cleaning code
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:flame/game.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../../core/service/app_sounds.dart';
|
||||
import '../../../../../core/theme/app_theme.dart';
|
||||
import '../../../domain/entities/game_entities.dart';
|
||||
import '../../bloc/game_bloc.dart';
|
||||
import 'card_codes.dart';
|
||||
@@ -222,7 +223,7 @@ class HokmGame extends FlameGame {
|
||||
|
||||
/// نمایشِ بزرگ و گذرای حکمِ انتخابشده در مرکزِ میز (با پاپ).
|
||||
void _spawnTrumpReveal(String trump) {
|
||||
final (sym, col) = _trumpGlyph(trump);
|
||||
final (sym, col) = suitGlyph(trump);
|
||||
final reveal = TextComponent(
|
||||
text: 'حکم $sym',
|
||||
anchor: Anchor.center,
|
||||
@@ -606,16 +607,4 @@ class HokmGame extends FlameGame {
|
||||
add(c);
|
||||
}
|
||||
|
||||
(String, Color) _trumpGlyph(String suit) {
|
||||
switch (suit) {
|
||||
case 'hearts':
|
||||
return ('♥', const Color(0xFFD32F2F));
|
||||
case 'diamonds':
|
||||
return ('♦', const Color(0xFFD32F2F));
|
||||
case 'clubs':
|
||||
return ('♣', Colors.white);
|
||||
default:
|
||||
return ('♠', Colors.white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user