Skip to content

Add example of function memory game#2313

Closed
voidpumpkin wants to merge 2 commits into
yewstack:masterfrom
voidpumpkin:leftstick/master
Closed

Add example of function memory game#2313
voidpumpkin wants to merge 2 commits into
yewstack:masterfrom
voidpumpkin:leftstick/master

Conversation

@voidpumpkin
Copy link
Copy Markdown
Member

Description

Original PR owner was not updating his PR so i just did it

Closes #2255

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

@voidpumpkin voidpumpkin added the A-examples Area: The examples label Dec 28, 2021
@voidpumpkin voidpumpkin requested review from ranile and siku2 December 28, 2021 21:55
@voidpumpkin voidpumpkin enabled auto-merge (squash) December 28, 2021 22:07
Copy link
Copy Markdown
Member

@siku2 siku2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for picking this up

Comment thread Cargo.toml
Comment on lines 15 to +16
"examples/function_todomvc",
"examples/function_memory_game",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorted alphabetically:

Suggested change
"examples/function_todomvc",
"examples/function_memory_game",
"examples/function_memory_game",
"examples/function_todomvc",

Hope I didn't mess up the indentation on my phone

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, will update

Comment on lines +1 to +4
# rust-memory-game


A port version of [react-memory-game](https://github.com/leftstick/react-memory-game). You are able to try it at [here](https://img.shields.io/website?label=demo&url=https%3A%2F%2Fexamples.yew.rs%2Ffunction_memory_game)](https://examples.yew.rs/function_memory_game)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we adjust this to be more in line with the other examples? I.e. title, example badge.

Also that [here] markdown is all over the place.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIll update it

Comment on lines +13 to +15
## LICENSE

[MIT License](https://raw.githubusercontent.com/yewstack/yew/examples/function_memory_game/master/LICENSE)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird link and probably not really needed since the license isn't particular to this example, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, it should be removed. Thanks for reminding

Comment on lines +7 to +8
<title>Yew • Function MemoryGame</title>
<base data-trunk-public-url/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<title>Yew • Function MemoryGame</title>
<base data-trunk-public-url/>
<title>Yew • Function Memory Game</title>
<base data-trunk-public-url />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless it's actually supposed to be stylised as MemoryGame...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update


let get_link_by_cardname = {
match name {
CardName::EightBall => "public/8-ball.png",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this here because I can't put it on the file directly.

Do we know the origin of these image assets? Or more importantly, the license?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is port version of Memory-Game. I will try to check with the author if it is possible we can use them Since he forgot to specify the license in his project.
Thanks for reminding me the issue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siku2 i got confirmed by the author, bradlygreen/Memory-Game#6. We are possible to use those images

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming

@ranile
Copy link
Copy Markdown
Member

ranile commented Dec 29, 2021

Original PR was updated. Which one should we proceed with?

auto-merge was automatically disabled December 29, 2021 13:36

Pull request was closed

@voidpumpkin voidpumpkin deleted the leftstick/master branch December 29, 2021 13:37
@voidpumpkin voidpumpkin mentioned this pull request Dec 29, 2021
2 tasks
@leftstick
Copy link
Copy Markdown
Contributor

@hamza1311 thanks for your review. I missed this PR, so that I will update code based on your comments in the original PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-examples Area: The examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants