Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿž๋žœ๋ค์ง€๋ขฐ ์ƒ์„ฑ ๊ฐœ์ˆ˜ ๋ฒ„๊ทธ #3

Closed
Yeram522 opened this issue Sep 21, 2021 · 2 comments

Comments

@Yeram522
Copy link
Owner

image
์ •์ƒ์ถœ๋ ฅ

image
๋น„์ •์ƒ์ ์ธ์ถœ๋ ฅ ๐Ÿ‘‰ Flag์™€ Spot์˜ ๊ฐœ์ˆ˜๊ฐ€ ๋‹ค๋ฆ„.

๐Ÿค” ์ •๋ง ๋žœ๋คํ•˜๊ฒŒ Flag๊ฐœ์ˆ˜์™€ ์ง€๋ขฐ๊ฐœ์ˆ˜๊ฐ€ ์ผ์น˜ํ•  ๋–„๋„ ์žˆ๊ณ , ์ผ์น˜ํ•˜์ง€ ์•Š์„ ๋•Œ๋„ ์žˆ๋‹ค.ใ…œใ…œ

@Yeram522
Copy link
Owner Author

๐Ÿ’ก ์˜ˆ์ƒํ–ˆ๋˜ ๋Œ€๋กœ ์ค‘๋ณต์ด ๋ฌธ์ œ์˜€๋‹ค.
๋””๋ฒ„๊น… ์ „์— ๋Œ€์ถฉ "์ค‘๋ณต"๋ฌธ์ œ๋ผ๊ณ  ์˜ˆ์ƒํ•ด์„œ, ์ผ๋ถ€๋กœ ํ•จ์ˆ˜ ๋”ฐ๋กœ ๊ตฌํ˜„ํ•ด์„œ ํ–ˆ๋˜๊ฑด๋ฐ,,;;
์ค‘๊ฐ„์— ๋‚œ ์™œ ๋ˆˆ์น˜๋ฅผ ๋ชป์ฑ˜์ง€.. ํ•จ์ˆ˜ ๋กœ์ง ๋‹ค์‹œ ์‚ดํŽด๋ด์•ผ๊ฒ ๋‹ค.

image

void Screen::Set_Filed(const int _size, const int _spot, Field* _fields)//๋งค๊ฐœ๋ณ€์ˆ˜: ๋žœ๋ค ์ง€๋ขฐ๊ฐœ์ˆ˜.
{
	int placed_count= _spot;
	int* seeds = new int[_size]; //๋žœ๋ค๊ฐ’ ์ค‘๋ณต ๋ฐฉ์ง€๋ฅผ ์œ„ํ•ด ๊ฐ’ ์ €์žฅ.
	memset(seeds, -1, sizeof(seeds));
	while (placed_count > 0)
	{
		int i = (rand() % (_size-1) + 1);// 1 ~ size ๊นŒ์ง€

		if ((i >= 11 && i % 11 == 0) || Check_OverLap_Seed(seeds, i)) continue;
		seeds[_spot - placed_count] = i;
		_fields[i - 1].Changestate(STATE_SPOT);
		placed_count--;
	}
	
	delete[] seeds;
}
//randseed ์ค‘๋ณต ์ฒดํฌ ํ•จ์ˆ˜: ๊ฒ€์‚ฌํ•  ๊ฐ’์„ ๋„ฃ๊ณ  ์ค‘๋ณต์ด ์—†์œผ๋ฉด false๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
bool Screen::Check_OverLap_Seed(int* _seeds,const int _seed)
{
	for (int i = 0; i < sizeof(_seeds); i++)
	{
		if (_seeds[i] == _seed) return true;
	}

	return false;
}

@Yeram522
Copy link
Owner Author

image

โœ… ๋””๋ฒ„๊ฑฐ๋กœ ๊ฐ’ ๋„ฃ์œผ๋ฉด์„œ ๋Œ๋ฆฐ ๊ฒฐ๊ณผ, seeds์˜ ๋ฐฐ์—ด์ด ์ œ๋Œ€๋กœ ์ดˆ๊ธฐํ™” ์•ˆ๋˜๋Š” ์ ์„ ๋ฐœ๊ฒฌํ–ˆ๋‹ค.
๊ทธ๋ž˜์„œ sizeof์˜ ๊ฐ’์„ ์ฐ์–ด๋ณด๋‹ˆ...ํฌ๊ธฐ๊ฐ€ 4๊ฐ€ ๋‚˜์˜ค๋Š” ๊ฒƒ์ด๋‹ค.
sizeof ํ•จ์ˆ˜์˜ ์“ฐ์ž„์„ ์ œ๋Œ€๋กœ ์•Œ์ง€ ๋ชปํ•˜๊ณ  ์‚ฌ์šฉํ•œ ๋‚ด ์‹ค์ˆ˜์˜€๋‹ค.ใ… ใ… ใ… 
sizeof๊ฐ€ ์•„๋‹Œ ๋ฐฐ์—ด ์‚ฌ์ด์ฆˆ๋ฅผ ๋„ฃ์–ด์ฃผ๋‹ˆ, ์ œ๋Œ€๋กœ ์ดˆ๊ธฐํ™”๊ฐ€ -1๋กœ ๋˜์—ˆ๊ณ , ์ค‘๋ณต ๊ฒ€์‚ฌ ํ•จ์ˆ˜๋„ ๋ถˆํ•„์š”ํ•œ ํƒ์ƒ‰์„ ์ค„์ด๊ธฐ ์œ„ํ•ด์„œ
while๋ฌธ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ”๊พธ์—ˆ๋‹ค.

//randseed ์ค‘๋ณต ์ฒดํฌ ํ•จ์ˆ˜: ๊ฒ€์‚ฌํ•  ๊ฐ’์„ ๋„ฃ๊ณ  ์ค‘๋ณต์ด ์—†์œผ๋ฉด false๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
bool Screen::Check_OverLap_Seed(const int* _seeds,const int _seed)
{
	int i = 0;
	while (_seeds[i] != -1)
	{
		if (_seeds[i] == _seed) return true;
		i++;
	}

	return false;
}

Yeram522 added a commit that referenced this issue Sep 26, 2021
commit d65427d
Author: Yeram522 <kyeram522@gmail.com>
Date:   Mon Sep 27 05:02:00 2021 +0900

    ๐ŸŒž ๊ฒŒ์ž„ ํด๋ฆฌ์–ด ์กฐ๊ฑด ์ถ”๊ฐ€ ์™„๋ฃŒ!

    ๊ณผ์ œ ๋!

commit 52dcbb0
Author: Yeram522 <kyeram522@gmail.com>
Date:   Mon Sep 27 04:26:04 2021 +0900

    Update Browse.VC.db

commit f391598
Author: Yeram522 <kyeram522@gmail.com>
Date:   Mon Sep 27 04:25:43 2021 +0900

    โš’ UI ๋‹ค๋“ฌ๊ธฐ ๋ฐ ์ฝ”๋“œ ์ˆ˜์ •

    1๏ธโƒฃ `extern bool* isLooping;` ์ „์—ญ๋ณ€์ˆ˜ ์œ„์น˜ ๋ณ€๊ฒ…
    2๏ธโƒฃ UI ๋‹ค๋“ฌ๊ธฐ

commit 1cd79f3
Author: Marey <63442636+Yeram522@users.noreply.github.com>
Date:   Mon Sep 27 04:04:46 2021 +0900

    โœ… ๊ฒŒ์ž„์ข…๋ฃŒ์‹œ ์˜ค๋ฅ˜์ฐฝ ํ•ด๊ฒฐ (#13)

commit 87249b8
Author: Marey <63442636+Yeram522@users.noreply.github.com>
Date:   Mon Sep 27 03:43:43 2021 +0900

    โœ… ๊ฒŒ์ž„์ข…๋ฃŒ์‹œ ์˜ค๋ฅ˜์ฐฝ ํ•ด๊ฒฐ (#12)

commit 0272df5
Author: Marey <63442636+Yeram522@users.noreply.github.com>
Date:   Mon Sep 27 00:34:07 2021 +0900

    โœ…์ฃผ๋ณ€ ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ (#10)

    ์ˆ˜์‹์ผ๋ฐ˜ํ™” ์˜ค๋ฅ˜!
    up = point + 11;
    down= point - 11;
    ๋กœ ์ˆ˜์ •ํ•จ.

commit ba710b1
Merge: 202fe10 46ca1a8
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sun Sep 26 05:28:57 2021 +0900

    Merge branch 'ver1.0' into develope

commit 202fe10
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sun Sep 26 05:27:50 2021 +0900

    Squashed commit of the following:

    commit 46ca1a8
    Author: Yeram522 <kyeram522@gmail.com>
    Date:   Sun Sep 26 05:22:37 2021 +0900

        ๐Ÿ–ฑ๋งˆ์šฐ์Šค ํด๋ฆญ์‹œ ํ•ด๋‹น ํ•„๋“œ ๋ฒ„ํŠผ ์—ด๋ฆผ ์™„๋ฃŒ

    commit a63b740
    Author: Yeram522 <kyeram522@gmail.com>
    Date:   Sat Sep 25 03:27:27 2021 +0900

        ๐Ÿ–ฑ๋งˆ์šฐ์Šค ์ž…๋ ฅ ์ฒ˜๋ฆฌ ํ•จ์ˆ˜ ๊ตฌํ˜„

        ๐Ÿž virtual/override ํ•จ์ˆ˜ ์‚ฌ์šฉ ๊ณผ์ •์—์„œ E0245์˜ค๋ฅ˜ ๋ฐœ์ƒ..์•„์ง ๋ฏธํ•ด๊ฒฐ..ใ… ใ… 
        `a nonstatic member reference must be relative to a specific object`

commit 46ca1a8
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sun Sep 26 05:22:37 2021 +0900

    ๐Ÿ–ฑ๋งˆ์šฐ์Šค ํด๋ฆญ์‹œ ํ•ด๋‹น ํ•„๋“œ ๋ฒ„ํŠผ ์—ด๋ฆผ ์™„๋ฃŒ

commit a63b740
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sat Sep 25 03:27:27 2021 +0900

    ๐Ÿ–ฑ๋งˆ์šฐ์Šค ์ž…๋ ฅ ์ฒ˜๋ฆฌ ํ•จ์ˆ˜ ๊ตฌํ˜„

    ๐Ÿž virtual/override ํ•จ์ˆ˜ ์‚ฌ์šฉ ๊ณผ์ •์—์„œ E0245์˜ค๋ฅ˜ ๋ฐœ์ƒ..์•„์ง ๋ฏธํ•ด๊ฒฐ..ใ… ใ… 
    `a nonstatic member reference must be relative to a specific object`

commit c3e6ee3
Merge: a714f9a 8a529ba
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sat Sep 25 01:26:09 2021 +0900

    Merge branch 'ver1.0' into develope

commit a714f9a
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sat Sep 25 01:17:35 2021 +0900

    Squashed commit of the following:

    commit 8a529ba
    Author: Yeram522 <kyeram522@gmail.com>
    Date:   Sat Sep 25 01:11:38 2021 +0900

        โœจheader & cpp ํŒŒ์ผ ๋ถ„ํ•  ๋ฐ ์ •๋ฆฌ

        key์ž…๋ ฅ ์ฝ” +  Screen ํด๋ž˜์Šค-> **Game2D ํด๋ž˜์Šค**
        ๋กœ ์ •๋ฆฌํ–ˆ๋‹ค.
        main.cpp์— ์žˆ๋Š” Test Class๋Š” Game2D ํด๋ž˜์Šค๋ฅผ ์ƒ์†๋ฐ›๋Š”๋‹ค.

    commit 6e69171
    Author: Yeram522 <kyeram522@gmail.com>
    Date:   Fri Sep 24 23:13:35 2021 +0900

        ๐Ÿ–ฑ ๋งˆ์šฐ์Šค ์ž…๋ ฅ ์ฝ”๋“œ ์ถ”๊ฐ€

        โœ… ์ž‘๋™ ์ž˜ ๋จ!

    commit 00e71d0
    Author: Yeram522 <kyeram522@gmail.com>
    Date:   Fri Sep 24 22:11:59 2021 +0900

        ๐Ÿž์ฃผ๋ณ€ ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์˜ค๋ฅ˜

        โœ… ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์ž‘์„ฑ ๋ฐ ๊ตฌ๋™ ๋กœ์ง์€ ํ™•์ธ!

commit 8a529ba
Author: Yeram522 <kyeram522@gmail.com>
Date:   Sat Sep 25 01:11:38 2021 +0900

    โœจheader & cpp ํŒŒ์ผ ๋ถ„ํ•  ๋ฐ ์ •๋ฆฌ

    key์ž…๋ ฅ ์ฝ” +  Screen ํด๋ž˜์Šค-> **Game2D ํด๋ž˜์Šค**
    ๋กœ ์ •๋ฆฌํ–ˆ๋‹ค.
    main.cpp์— ์žˆ๋Š” Test Class๋Š” Game2D ํด๋ž˜์Šค๋ฅผ ์ƒ์†๋ฐ›๋Š”๋‹ค.

commit 6e69171
Author: Yeram522 <kyeram522@gmail.com>
Date:   Fri Sep 24 23:13:35 2021 +0900

    ๐Ÿ–ฑ ๋งˆ์šฐ์Šค ์ž…๋ ฅ ์ฝ”๋“œ ์ถ”๊ฐ€

    โœ… ์ž‘๋™ ์ž˜ ๋จ!

commit 6336864
Author: Yeram522 <kyeram522@gmail.com>
Date:   Fri Sep 24 22:11:59 2021 +0900

    ๐Ÿž์ฃผ๋ณ€ ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์˜ค๋ฅ˜

    โœ… ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์ž‘์„ฑ ๋ฐ ๊ตฌ๋™ ๋กœ์ง์€ ํ™•์ธ!

commit 00e71d0
Author: Yeram522 <kyeram522@gmail.com>
Date:   Fri Sep 24 22:11:59 2021 +0900

    ๐Ÿž์ฃผ๋ณ€ ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์˜ค๋ฅ˜

    โœ… ์ง€๋ขฐ ์นด์šดํŠธ ํ•จ์ˆ˜ ์ž‘์„ฑ ๋ฐ ๊ตฌ๋™ ๋กœ์ง์€ ํ™•์ธ!

commit 9c5bab4
Author: Yeram522 <kyeram522@gmail.com>
Date:   Wed Sep 22 21:27:28 2021 +0900

    โœจ์ƒˆ ์ž‘์—… ํ•˜๊ธฐ ์ „ ๋ฐฑ์—… ๋ฐ header,cpp ํŒŒ์ผ ์ •๋ฆฌ!

commit 11a769c
Author: Yeram522 <kyeram522@gmail.com>
Date:   Tue Sep 21 21:13:28 2021 +0900

    โœ… ๋ฒ„๊ทธ ํ•ด๊ฒฐ ์™„๋ฃŒ

    #3

commit 0720d47
Author: Yeram522 <kyeram522@gmail.com>
Date:   Tue Sep 21 19:26:34 2021 +0900

    ๋žœ๋ค์œผ๋กœ ์ง€๋ขฐ๊ฐ€ ์‹ฌ์–ด์ง€๋Š” ํ•จ์ˆ˜ ๋งŒ๋“ค๊ธฐ

    โœ” rand()์™€ srand()๋ฅผ ํ†ตํ•ด ๋ฌด์ž‘์œ„๋กœ 10~20๊ฐœ์˜ ์ง€๋ขฐ๊ฐ€ ์ƒ์„ฑ
    โœ” Screen ๊ฐ์ฒด์—์„œ printํ•  ๋•Œ, ์‹ค์‹œ๊ฐ„์œผ๋กœ ๊ฐ์ฒด์˜ state๋ฅผ ๋ถˆ๋Ÿฌ์™€์„œ ๋ฐ”๋กœ ํ•ด๋‹น state์˜ char์„ ๋ณต์‚ฌํ•จ.

    ๐Ÿž ํ•ด๋‹น ๊ฐœ์ˆ˜ ๋งŒํผ ์ง€๋ขฐ๊ฐ€ ์•ˆ ์‹ฌ์–ด์ง€๋Š” ๋ฒ„๊ทธ ํ•ด๊ฒฐ์ค‘!!
    - ์ค‘๋‹จ์  ์ฐ์–ด์„œ ๋””๋ฒ„๊น… ํ•ด๋ณด์ž!!

commit 710be2e
Author: Yeram522 <kyeram522@gmail.com>
Date:   Tue Sep 21 16:11:03 2021 +0900

    ์ธํ„ฐํŽ˜์ด์Šค ์กฐ์ • ๋ฐ ์„ธ๋ถ€ ํด๋ž˜์Šค ํ—ค๋” ๋ถ„ํ• 

    ๐Ÿ’ก 'UI ์กฐ์ •ํ•˜๊ธฐ` ์ด์Šˆ ํ•ด๊ฒฐ ์™„๋ฃŒ!!

commit 5ced195
Author: Yeram522 <kyeram522@gmail.com>
Date:   Tue Sep 21 00:47:25 2021 +0900

    ํŒŒ์ผ ๋ถ„ํ™œ

    ๐Ÿ“„ํด๋ž˜์Šค๋ณ„๋กœ ํ—ค๋”ํŒŒ์ผ ๋ถ„ํ™œ

commit 5cddcbc
Author: Yeram522 <kyeram522@gmail.com>
Date:   Mon Sep 20 23:52:41 2021 +0900

    ๊ธฐ๋ณธ์ ์ธ ๊ฒŒ์ž„ ํ™”๋ฉด ๊ตฌํ˜„

    โœ” ์ˆ˜์—…์‹œ๊ฐ„์— ๋ฐฐ์šด Screen ํด๋ž˜์Šค์™€ Borland ํ—ค๋”๋ฅผ ์ด์šฉํ•ด, ์ง€๋ขฐ์ฐพ๊ธฐ ํ•„๋“œ๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค.
    โœ” ์ฝ˜์†” ์ƒ‰ ๋ณ€๊ฒฝ๋„ ํ•ด๋ณด์•˜๋‹ค.

commit 24c1f54
Author: Yeram522 <kyeram522@gmail.com>
Date:   Mon Sep 20 14:31:28 2021 +0900

    Screen Cursor

    โœ” ๋…นํ™” ๊ฐ•์˜ ์žฌ์ˆ˜๊ฐ• ํ›„, ์ˆ˜์—…์‹œ๊ฐ„์— ์ง„ํ–‰ํ•œ ๋ฉ”์ธ ์Šคํฌ๋ฆฝํŠธ copy
    โœ” Utils.h ํ—ค๋”ํŒŒ์ผ ์ถ”๊ฐ€.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant