Тёмный

Observer Pattern Tutorial 

Coding With Adam
Подписаться 11 тыс.
Просмотров 4,8 тыс.
50% 1

In this exciting tutorial we are going to learn about the observer pattern. Not your typical observer pattern tutorial. We toss the wikipedia article aside and apply the observer pattern to a game.
The game is simple, click the buttons at the top of the screen and the characters will perform the action. We coordinate the actions through the observer pattern.
At its core the pattern revolves around a subject that the observer will observe. The subject has a list of observers(one-to-many relationship). Observers can choose to register with the subject. The subject at any point in time can notify the observers by looping through all observers and calling the update method.
For example let's say the our subject is the RU-vid channel Coding With Adam. The observers would be RU-vid users. RU-vid users can register with the subject by subscribing. When the RU-vid channel owner(subject) uploads a new video they can notify all subscribers(observers).
Learn more by watching the video.
Github:
github.com/CodingWith-Adam/ob...
Try it here:
codingwith-adam.github.io/obs...

Наука

Опубликовано:

 

31 окт 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@randysewell3199
@randysewell3199 5 месяцев назад
That was the smoothest plug for subscribers I have seen!
@CodingWithAdam
@CodingWithAdam 5 месяцев назад
Thank you!!! 😁
@emmanueljr
@emmanueljr Год назад
your teaching style is really good and easy to understand,thank you for the video
@CodingWithAdam
@CodingWithAdam Год назад
Thank you! I really appreciate the feedback 😁
@soniamaklouf1178
@soniamaklouf1178 2 года назад
Great adam will you apply other design pattern to the game ? find it more easy to understand like that
@CodingWithAdam
@CodingWithAdam 2 года назад
Thanks Sonia, I like the suggestion of continuing to apply design patterns to games. At the very least I'll try to make it interesting to learn :)
@hannahleah5875
@hannahleah5875 11 дней назад
@@CodingWithAdam Please do! Thanks for this!
@kalahari8295
@kalahari8295 2 года назад
Polymorphism 😀
@CodingWithAdam
@CodingWithAdam 2 года назад
👍
@zaidradaideh8520
@zaidradaideh8520 15 дней назад
where are u from ادم
Далее
Observer Pattern - Design Patterns (ep 2)
49:47
Просмотров 557 тыс.
How To Create a JavaScript TileMap For a 2D Game
23:27
Cabeças erguidas, galera! 🙌 Vamos pegá-la!
00:10
How to do MORE with the Observer Pattern
13:09
Просмотров 9 тыс.
Tutorial: The Observer Pattern in Python
21:20
Просмотров 39 тыс.
The 6 Design Patterns game devs need?
24:20
Просмотров 362 тыс.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
S-Pen в Samsung достоин Золота #Shorts
0:38