Форум программистов, компьютерный форум, киберфорум
Ruby
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.71/7: Рейтинг темы: голосов - 7, средняя оценка - 4.71
1 / 1 / 0
Регистрация: 05.10.2018
Сообщений: 18

Write a program so that you can interact with your baby dragon.

16.03.2019, 10:45. Показов 1528. Ответов 4
Метки ruby (Все метки)

Студворк — интернет-сервис помощи студентам
Write a program so that you can interact with your baby dragon. You should be able to enter commands like feed and walk, and have those methods be called on your dragon. Of course, since what you are inputting are just strings, you will have to have some sort of method dispatch, where your program checks which string was entered, and then calls the appropriate method.


Автор вроде-бы просит написать целую программу, которая будет контактировать с его программой, но, как я понял, нужно всё-таки написать метод , вызывающий другие методы с помощью ввода.

Вся программа, кроме метода dispatch- программа автора.

Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
class Dragon
 
  def initialize name
    @name = name
    @asleep = false
    @stuffInBelly     = 10  # He's full.
    @stuffInIntestine =  0  # He doesn't need to go.
 
    puts @name + ' is born.'
  end
 
  def feed
    puts 'You feed ' + @name + '.'
    @stuffInBelly = 10
    passageOfTime
  end
 
  def walk
    puts 'You walk ' + @name + '.'
    @stuffInIntestine = 0
    passageOfTime
  end
 
  def putToBed
    puts 'You put ' + @name + ' to bed.'
    @asleep = true
    3.times do
      if @asleep
        passageOfTime
      end
      if @asleep
        puts @name + ' snores, filling the room with smoke.'
      end
    end
    if @asleep
      @asleep = false
      puts @name + ' wakes up slowly.'
    end
  end
 
  def toss
    puts 'You toss ' + @name + ' up into the air.'
    puts 'He giggles, which singes your eyebrows.'
    passageOfTime
  end
 
  def rock
    puts 'You rock ' + @name + ' gently.'
    @asleep = true
    puts 'He briefly dozes off...'
    passageOfTime
    if @asleep
      @asleep = false
      puts '...but wakes when you stop.'
    end
  end
 
 
  # "private" means that the methods defined here are
  # methods internal to the object.  (You can feed
  # your dragon, but you can't ask him if he's hungry.)
 
  def hungry?
    # Method names can end with "?".
    # Usually, we only do this if the method
    # returns true or false, like this:
    @stuffInBelly <= 2
  end
 
  def poopy?
    @stuffInIntestine >= 8
  end
 
  def passageOfTime
    if @stuffInBelly > 0
      # Move food from belly to intestine.
      @stuffInBelly     = @stuffInBelly     - 1
      @stuffInIntestine = @stuffInIntestine + 1
    else  # Our dragon is starving!
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'                                                        
      end
      puts @name + ' is starving!  In desperation, he ate YOU!'
      exit  # This quits the program.
      private
    end
 
    if @stuffInIntestine >= 10
      @stuffInIntestine = 0
      puts 'Whoops!  ' + @name + ' had an accident...'
    end
 
    if hungry?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + '\'s stomach grumbles...'
    end
 
    if poopy?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + ' does the potty dance...'
    end
  end
 
end
 
def dispatch
command = gets.chomp
methodHash  = Hash.new
methodHash['feed']  = feed
 
if command == 'feed'
  puts methodHash['feed']
end
 
  end
 
 
 
 
pet = Dragon.new 'Norbert'
 
pet.dispatch



Почему-то в консоли этот метод называют приватным


Code
1
2
3
4
5
C:\Users\Женя>classDragon
Norbert is born.
Traceback (most recent call last):
C:/Users/Женя/classDragon.rb:129:in `<main>': private method `dispatch' called for #<Dragon:0x00000000030be020> (NoMethodError)
Did you mean?  display
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
16.03.2019, 10:45
Ответы с готовыми решениями:

Write a program to perform the following operations
Write a program to perform the following operations: a) Create an integer array of floating point numbers. b) Finding and removing...

Write a program that performs operations
Write a program that performs operations: a) Create an array, each element of which contains the angle in radians. b) Sort the array in...

TASK: Write a program that displays the multiplication table 10 by 10 as follows: 1 2 3 … 2 4 6 … 3 6 9 …
Write a program that displays the multiplication table 10 by 10 as follows: 1 2 3 … 2 4 6 … 3 6 9 … Есть такая задачка) я пока...

4
Фрилансер
 Аватар для Black Fregat
3709 / 2082 / 567
Регистрация: 31.05.2009
Сообщений: 6,683
16.03.2019, 21:00
Оно пишет NoMethodError - ведь dispatch вообще не метод класса, он вне его
0
1 / 1 / 0
Регистрация: 05.10.2018
Сообщений: 18
19.03.2019, 15:46  [ТС]
Write a program so that you can interact with your baby dragon. You should be able to enter commands like feed and walk, and have those methods be called on your dragon. Of course, since what you are inputting are just strings, you will have to have some sort of method dispatch, where your program checks which string was entered, and then calls the appropriate method.


Автор вроде-бы просит написать целую программу, которая будет контактировать с его программой, но, как я понял, нужно всё-таки написать метод , вызывающий другие методы с помощью ввода.

Вся программа, кроме метода dispatch- программа автора.

Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
  def initialize name
    @name = name
    @asleep = false
    @stuffInBelly     = 10  # He's full.
    @stuffInIntestine =  0  # He doesn't need to go.
 
    puts @name + ' is born.'
  end
 
  def feed
    puts 'You feed ' + @name + '.'
    @stuffInBelly = 10
    passageOfTime
  end
 
  def walk
    puts 'You walk ' + @name + '.'
    @stuffInIntestine = 0
    passageOfTime
  end
 
  def putToBed
    puts 'You put ' + @name + ' to bed.'
    @asleep = true
    3.times do
      if @asleep
        passageOfTime
      end
      if @asleep
        puts @name + ' snores, filling the room with smoke.'
      end
    end
    if @asleep
      @asleep = false
      puts @name + ' wakes up slowly.'
    end
  end
 
  def toss
    puts 'You toss ' + @name + ' up into the air.'
    puts 'He giggles, which singes your eyebrows.'
    passageOfTime
  end
 
  def rock
    puts 'You rock ' + @name + ' gently.'
    @asleep = true
    puts 'He briefly dozes off...'
    passageOfTime
    if @asleep
      @asleep = false
      puts '...but wakes when you stop.'
    end
  end
 
 
  # "private" means that the methods defined here are
  # methods internal to the object.  (You can feed
  # your dragon, but you can't ask him if he's hungry.)
 
  def hungry?
    # Method names can end with "?".
    # Usually, we only do this if the method
    # returns true or false, like this:
    @stuffInBelly <= 2
  end
 
  def poopy?
    @stuffInIntestine >= 8
  end
 
  def passageOfTime
    if @stuffInBelly > 0
      # Move food from belly to intestine.
      @stuffInBelly     = @stuffInBelly     - 1
      @stuffInIntestine = @stuffInIntestine + 1
    else  # Our dragon is starving!
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'                                                        
      end
      puts @name + ' is starving!  In desperation, he ate YOU!'
      exit  # This quits the program.
      private
    end
 
    if @stuffInIntestine >= 10
      @stuffInIntestine = 0
      puts 'Whoops!  ' + @name + ' had an accident...'
    end
 
    if hungry?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + '\'s stomach grumbles...'
    end
 
    if poopy?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + ' does the potty dance...'
    end
  end
def dispatch
command = gets.chomp
methodHash  = Hash.new
while command != 'exit'
if command == 'feed'
  puts feed
 else 
  if command == 'walk'
    puts walk
  
  else 
  if command == 'putToBed'
    puts putToBed
 
  else 
  if command == 'toss'
    puts toss
 
  else 
  if command == 'rock'
    puts rock
  end
end
 end
  end
   end
  
end
end
end
pet = Dragon.new 'Norbert'
 
pet.dispatch




Помогите разобраться с этим методом dispatch
Вот, что выдаёт консоль

Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
eed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Whoops!  Norbert had an accident...
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Whoops!  Norbert had an accident...
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Whoops!  Norbert had an accident...
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Norbert does the potty dance...
 
You feed Norbert.
Whoops!  Norbert had an accident...
 
You feed Norbert.

и так бесконечно, если ввести 'feed'

 Комментарий модератора 

Правила форума

4. Порядок создания тем.
4.13 Если на ваш вопрос долгое время нет ответа, уточните его, приведите дополнительные сведения, которые могут помочь участникам форума решить вашу проблему.
4.14 Чтобы "поднять" тему в разделе и поиске по форуму, используйте осмысленные сообщения, например "Тема/проблема/задача актуальна". Если вы чего-то достигли в решении проблемы на этот момент, сообщите об этом.

5. Запреты и ограничения.
5.5 Запрещено размещать тему в нескольких подразделах одного раздела одновременно (кросспостинг), а также дублировать тему в одном разделе.


Добавлено через 59 минут
Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def dispatch
command = gets.chomp
 
command = ''
while command != 'exit'
if command == 'feed'
  puts feed
 else 
  if command == 'walk'
    puts walk
  
  else 
  if command == 'putToBed'
    puts putToBed
 
  else 
  if command == 'toss'
    puts toss
 
  else 
  if command == 'rock'
    puts rock
  end
end
 end
  end
   end
  
end
end


в теории тут всё должно работать, но если ввести
Ruby
1
feed
она ничего не выводит:

Norbert is born.
feed
0
the hardway first
Эксперт JS
 Аватар для j2FunOnly
2475 / 1847 / 910
Регистрация: 05.06.2015
Сообщений: 3,610
19.03.2019, 15:56
RoflanGenius, у вас команда один раз до цикла запрашивается и потом постоянно проверяется одно и то же.
Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
def dispatch
  command = gets.chomp
  methodHash = Hash.new # what is it?
 
  # `command` не изменяется в теле цикла - бесконечный цикл
  while command != 'exit'
    if command == 'feed'
      puts feed
      else
      # code omit for bravity
    end
  end
end
Каким образом у вас ключевое слово private оказалось в методе Dragon#passageOfTime?

Для ясности возьмём оригинал и мне кажется автор имел ввиду просто сделать вспомогательный метод, например #dispatch, но не изменять класс Dragon, и вашу сумасшедшую ветку if...else (хотя тут явно напрашивается case, как минимум)
Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
class Dragon
 
  def initialize name
    @name = name
    @asleep = false
    @stuffInBelly     = 10  # He's full.
    @stuffInIntestine =  0  # He doesn't need to go.
 
    puts @name + ' is born.'
  end
 
  def feed
    puts 'You feed ' + @name + '.'
    @stuffInBelly = 10
    passageOfTime
  end
 
  def walk
    puts 'You walk ' + @name + '.'
    @stuffInIntestine = 0
    passageOfTime
  end
 
  def putToBed
    puts 'You put ' + @name + ' to bed.'
    @asleep = true
    3.times do
      if @asleep
        passageOfTime
      end
      if @asleep
        puts @name + ' snores, filling the room with smoke.'
      end
    end
    if @asleep
      @asleep = false
      puts @name + ' wakes up slowly.'
    end
  end
 
  def toss
    puts 'You toss ' + @name + ' up into the air.'
    puts 'He giggles, which singes your eyebrows.'
    passageOfTime
  end
 
  def rock
    puts 'You rock ' + @name + ' gently.'
    @asleep = true
    puts 'He briefly dozes off...'
    passageOfTime
    if @asleep
      @asleep = false
      puts '...but wakes when you stop.'
    end
  end
 
  private
 
  # "private" means that the methods defined here are
  # methods internal to the object.  (You can feed
  # your dragon, but you can't ask him if he's hungry.)
 
  def hungry?
    # Method names can end with "?".
    # Usually, we only do this if the method
    # returns true or false, like this:
    @stuffInBelly <= 2
  end
 
  def poopy?
    @stuffInIntestine >= 8
  end
 
  def passageOfTime
    if @stuffInBelly > 0
      # Move food from belly to intestine.
      @stuffInBelly     = @stuffInBelly     - 1
      @stuffInIntestine = @stuffInIntestine + 1
    else  # Our dragon is starving!
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + ' is starving!  In desperation, he ate YOU!'
      exit  # This quits the program.
    end
 
    if @stuffInIntestine >= 10
      @stuffInIntestine = 0
      puts 'Whoops!  ' + @name + ' had an accident...'
    end
 
    if hungry?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + '\'s stomach grumbles...'
    end
 
    if poopy?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + ' does the potty dance...'
    end
  end
 
end # class Dragon
 
def dispatch(pet, command)
  if command == 'feed'
    pet.feed
  else
    if command == 'walk'
      pet.walk
    else
      if command == 'putToBed'
        pet.putToBed
      else
        if command == 'toss'
          pet.toss
        else
          if command == 'rock'
            pet.rock
          end
        end
      end
    end
  end
end
 
pet = Dragon.new 'Norbert'
 
while 'exit' != command = gets.chomp
  dispatch(pet, command)
end
0
1 / 1 / 0
Регистрация: 05.10.2018
Сообщений: 18
19.03.2019, 16:05  [ТС]
Можете не отвечать , я разобрался

Ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
class Dragon
 
  def initialize name
    @name = name
    @asleep = false
    @stuffInBelly     = 10  # He's full.
    @stuffInIntestine =  0  # He doesn't need to go.
 
    puts @name + ' is born.'
  end
 
  def feed
    puts 'You feed ' + @name + '.'
    @stuffInBelly = 10
    passageOfTime
  end
 
  def walk
    puts 'You walk ' + @name + '.'
    @stuffInIntestine = 0
    passageOfTime
  end
 
  def putToBed
    puts 'You put ' + @name + ' to bed.'
    @asleep = true
    3.times do
      if @asleep
        passageOfTime
      end
      if @asleep
        puts @name + ' snores, filling the room with smoke.'
      end
    end
    if @asleep
      @asleep = false
      puts @name + ' wakes up slowly.'
    end
  end
 
  def toss
    puts 'You toss ' + @name + ' up into the air.'
    puts 'He giggles, which singes your eyebrows.'
    passageOfTime
  end
 
  def rock
    puts 'You rock ' + @name + ' gently.'
    @asleep = true
    puts 'He briefly dozes off...'
    passageOfTime
    if @asleep
      @asleep = false
      puts '...but wakes when you stop.'
    end
  end
 
 
  # "private" means that the methods defined here are
  # methods internal to the object.  (You can feed
  # your dragon, but you can't ask him if he's hungry.)
 
  def hungry?
    # Method names can end with "?".
    # Usually, we only do this if the method
    # returns true or false, like this:
    @stuffInBelly <= 2
  end
 
  def poopy?
    @stuffInIntestine >= 8
  end
 
  def passageOfTime
    if @stuffInBelly > 0
      # Move food from belly to intestine.
      @stuffInBelly     = @stuffInBelly     - 1
      @stuffInIntestine = @stuffInIntestine + 1
    else  # Our dragon is starving!
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'                                                        
      end
      puts @name + ' is starving!  In desperation, he ate YOU!'
      exit  # This quits the program.
      private
    end
 
    if @stuffInIntestine >= 10
      @stuffInIntestine = 0
      puts 'Whoops!  ' + @name + ' had an accident...'
    end
 
    if hungry?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + '\'s stomach grumbles...'
    end
 
    if poopy?
      if @asleep
        @asleep = false
        puts 'He wakes up suddenly!'
      end
      puts @name + ' does the potty dance...'
    end
  end
def dispatch
 
 
command = ''
 
while command != 'exit'
  command = gets.chomp
if command == 'feed'
  puts feed
 else 
  if command == 'walk'
    puts walk
  
  else 
  if command == 'putToBed'
    puts putToBed
 
  else 
  if command == 'toss'
    puts toss
 
  else 
  if command == 'rock'
    puts rock
  end
end
 end
  end
   end
  
end
end
end
pet = Dragon.new 'Norbert'
 
pet.dispatch
Добавлено через 6 минут
Я даже не заметил ваш ответ, но всё равно спасибо. Автор не рассказывал о методе
сase
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
19.03.2019, 16:05
Помогаю со студенческими работами здесь

Write a program which accepts two real numbers, asks whether the user requires a rounded or truncated result
задача на языке c# (ох уже эти экзамены) Write a program which accepts two real numbers, asks whether the user requires a rounded or...

NORMALIZE ME BABY...
Нaскoлькo вы нoрмaлизуете вaши бaзы дaнных? Сегoдня прoспoрил с индийским тoвaришем чaс. Ему лень писaть зaпрoсы, и делo дoхoдит дo...

No rule to make target 'C:/Program', needed by 'release/Program.o'. Stop
Доброго времени суток! Помогите, пожалуйста, исправить ошибку No rule to make target 'C:/Program', needed by 'release/Program.o'. Stop. ...

Запускается FactoryMethod.Program вместо AbstractFactory.Program - как исправить?
Запускается FactoryMethod.Program вместо AbstractFactory.Program - как исправить?

Предотвратить или перехватить ошибку DOMException: play() failed because the user didn't interact
Добрый день, подскажите плиииз! Надо проиграть звук. Написал для этого функцию-&quot;обертку&quot; над &quot;new Audio()&quot;. ...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
5
Ответ Создать тему
Новые блоги и статьи
SDL3 для Web (WebAssembly): сборка C/C++ проекта из консоли
8Observer8 30.01.2026
Содержание блога Если вы откроете примеры для начинающих на официальном репозитории SDL3 в папке: examples, то вы увидите, что все примеры используют следующие четыре обязательные функции, а. . .
Установка Emscripten SDK (emsdk) и CMake на Windows для сборки C и C++ приложений в WebAssembly (Wasm)
8Observer8 30.01.2026
Чтобы скачать Emscripten SDK (emsdk) необходимо сначало скачать и уставить Git: Install for Windows. Следуйте стандартной процедуре установки Git через установщик. Система контроля версиями Git. . .
Подключение Box2D v3 к SDL3 для Android: физика и отрисовка коллайдеров
8Observer8 29.01.2026
Содержание блога Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами. Версия v3 была полностью переписана на Си, в. . .
Инструменты COM: Сохранение данный из VARIANT в файл и загрузка из файла в VARIANT
bedvit 28.01.2026
Сохранение базовых типов COM и массивов (одномерных или двухмерных) любой вложенности (деревья) в файл, с возможностью выбора алгоритмов сжатия и шифрования. Часть библиотеки BedvitCOM Использованы. . .
Загрузка PNG с альфа-каналом на SDL3 для Android: с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 28.01.2026
Содержание блога SDL3 имеет собственные средства для загрузки и отображения PNG-файлов с альфа-каналом и базовой работы с ними. В этой инструкции используется функция SDL_LoadPNG(), которая. . .
Загрузка PNG с альфа-каналом на SDL3 для Android: с помощью SDL3_image
8Observer8 27.01.2026
Содержание блога SDL3_image - это библиотека для загрузки и работы с изображениями. Эта пошаговая инструкция покажет, как загрузить и вывести на экран смартфона картинку с альфа-каналом, то есть с. . .
Влияние грибов на сукцессию
anaschu 26.01.2026
Бифуркационные изменения массы гриба происходят тогда, когда мы уменьшаем массу компоста в 10 раз, а скорость прироста биомассы уменьшаем в три раза. Скорость прироста биомассы может уменьшаться за. . .
Воспроизведение звукового файла с помощью SDL3_mixer при касании экрана Android
8Observer8 26.01.2026
Содержание блога SDL3_mixer - это библиотека я для воспроизведения аудио. В отличие от инструкции по добавлению текста код по проигрыванию звука уже содержится в шаблоне примера. Нужно только. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru