Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HaikuArchives/Haiku2048
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 47f0ad22ad7e
Choose a base ref
...
head repository: HaikuArchives/Haiku2048
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 65ebb51fd225
Choose a head ref
  • 4 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 15, 2021

  1. Properly indented switch block in NumberView.cpp

    Harshit Sharma committed Oct 15, 2021
    Copy the full SHA
    0ef81aa View commit details

Commits on Oct 16, 2021

  1. Indented switch case blocks as well

    Harshit Sharma committed Oct 16, 2021
    Copy the full SHA
    1d7e2bc View commit details
  2. Removed curly braces within case statement

    Harshit Sharma committed Oct 16, 2021
    Copy the full SHA
    936527b View commit details
  3. Merge pull request #30 from harshit-sharma-gits/master

    Properly indented switch block in NumberView.cpp
    korli authored Oct 16, 2021
    Copy the full SHA
    65ebb51 View commit details
Showing with 37 additions and 12 deletions.
  1. +37 −12 NumberView.cpp
49 changes: 37 additions & 12 deletions NumberView.cpp
Original file line number Diff line number Diff line change
@@ -59,18 +59,43 @@ NumberView::Draw(BRect r)
cell512_bg = {237,200,80,0}, cell1024_bg = {237,197,63,0}, cell2048P_bg = {237,194,46,0},
cell_dark_fg = {119,110,101};

switch (fNumber) {
case 2: color_background = cell2_bg; color_foreground = cell_dark_fg; break;
case 4: color_background = cell4_bg; color_foreground = cell_dark_fg; break;
case 8: color_background = cell8_bg; break;
case 16: color_background = cell16_bg; break;
case 32: color_background = cell32_bg; break;
case 64: color_background = cell64_bg; break;
case 128: color_background = cell128_bg; break;
case 256: color_background = cell256_bg; break;
case 512: color_background = cell512_bg; break;
case 1024: color_background = cell1024_bg; break;
default: color_background = cell2048P_bg; break;
switch (fNumber)
{
case 2:
color_background = cell2_bg;
color_foreground = cell_dark_fg;
break;
case 4:
color_background = cell4_bg;
color_foreground = cell_dark_fg;
break;
case 8:
color_background = cell8_bg;
break;
case 16:
color_background = cell16_bg;
break;
case 32:
color_background = cell32_bg;
break;
case 64:
color_background = cell64_bg;
break;
case 128:
color_background = cell128_bg;
break;
case 256:
color_background = cell256_bg;
break;
case 512:
color_background = cell512_bg;
break;
case 1024:
color_background = cell1024_bg;
break;
default:
color_background = cell2048P_bg;
break;
}

SetHighColor(color_background);