guess_number_game 1.0.0 copy "guess_number_game: ^1.0.0" to clipboard
guess_number_game: ^1.0.0 copied to clipboard

A simple Dart package for Guess Number Game logic.

Guess Number Game #

Bu Dart paketi — son topish o'yini uchun biznes logikasini taqdim etadi.

Foydalanish #

import 'package:guess_number_game/guess_number_game.dart';

void main() {
  final game = GuessNumberGame(min: 1, max: 10, maxAttempts: 5);

  try {
    final result = game.guess(5);

    if (result == 0) {
      print('To\'g\'ri topdingiz!');
    } else if (result == -1) {
      print('Yuqoriroq son kiriting');
    } else {
      print('Pastroq son kiriting');
    }
  } on AttemptsExceededException {
    print('Urinishlar soni tugadi! O\'yinni qayta boshlang.');
  }
}
1
likes
130
points
29
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple Dart package for Guess Number Game logic.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on guess_number_game