summaryrefslogtreecommitdiff
path: root/Userland/Games/2048
AgeCommit message (Collapse)Author
2021-10-052048: Let user decide if he wants to continue the gameMohsan Ali
Before game finish when a player has reached target tile, Now player will be able to decide if he wants to continue or not
2021-08-282048: Remove wpath and cpath pledgesLuke Wilde
With the move to LibConfig, these are no longer needed.
2021-08-26Games: Remove unveiling /tmp/portal/configRalf Donau
Config::pledge_domains is applied before, hence /tmp/portal/config can and should be veiled.
2021-08-262048: Use LibConfig instead of Core::ConfigFileThitat Auareesuksakul
2021-08-22Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to opennetworkException
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
2021-08-22Everywhere: Use Core::ConfigFile::AllowWriting::Yes to allow writingnetworkException
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-07-21Userland: Add GUI::Window::add_menu() and use it everywhereAndreas Kling
Applications previously had to create a GUI::Menubar object, add menus to it, and then call GUI::Window::set_menubar(). This patch introduces GUI::Window::add_menu() which creates the menubar automatically and adds items to it. Application code becomes slightly simpler as a result. :^)
2021-07-19Everywhere: Use AK/Math.h if applicableHendiadyoin1
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-122048: Fix move success detectionDmitrii Ubskii
Whether or not tiles moved used to be determined by comparing new_tiles with m_tiles. This is no longer possible since the slide is done in-place. This fix makes the game look through the m_sliding_tiles, which contains previous and current position for each tile on the board, to determine whether any tile moved at all. If not, the move is deemed unsuccessful. Fixes #8008.
2021-06-112048: Animate sliding tilesDmitrii Ubskii
2021-06-112048: Encapsulate away Board's inner workingsDmitrii Ubskii
This change brings all the board twiddling code into the Board proper to enable sliding animations further down the line.
2021-06-112048: Add pop-in animation for newly added tilesDmitrii Ubskii
2021-06-112048: Abstract Board into its own structDmitrii Ubskii
2021-06-112048: East const all the thingsDmitrii Ubskii
2021-05-182048: Display action status tips in status barTimothy Flynn
2021-05-182048: Do not default to only temporarily applying settings changesTimothy Flynn
Also tweak its text in the settings window to be clearer on what this check box is doing. Seemed a bit confusing that settings changes required an extra action to persist.
2021-05-182048: Widen the settings windowTimothy Flynn
It's currently too small to fit the text of some of the settings (in particular, the "Target tile" text).
2021-05-182048: Intialize settings window with current valuesTimothy Flynn
Currently, each time you open the settings window in 2048, it displays the default values rather than the current values. This is confusing, so display the current values instead.
2021-05-182048: Minimize player score when selecting worst tileDmitrii Ubskii
Maximizing the board population still takes priority, but if there are tile generator "moves" that result in equivalent board population after a player move, the one with the lowest score is selected.
2021-05-182048: Evil AI logic: select new tile in the worst positionDmitrii Ubskii
Not very smart: the worst position is defined such that after the player's next move the fewest tiles remain empty.
2021-05-182048: Evil AI settings entryDmitrii Ubskii
2021-05-182048: Refactor tile sliding and score logic out of attempt_move()Dmitrii Ubskii
2021-05-13Userland: Tighten a *lot* of pledges! :^)Andreas Kling
Since applications using Core::EventLoop no longer need to create a socket in /tmp/rpc/, and also don't need to listen for incoming connections on this socket, we can remove a whole bunch of pledges!
2021-05-122048: Add separator before quit menu actionLinus Groh
2021-05-112048: Added Redo SupportUmar Haroon
2021-04-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-142048: Alt shortcuts and book title capitalization in menusAndreas Kling
2021-04-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-04-052048: Give the board view a nice GUI::Frame look :^)Andreas Kling
2021-03-25Userland: Turn all application menus into window menus :^)Andreas Kling
2021-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-01-16Everywhere: Drop "shared_buffer" in most GUI programs, pledge "recvfd"Andreas Kling
Now that WindowServer broadcasts the system theme using an anonymous file, we need clients to pledge "recvfd" so they can receive it. Some programs keep the "shared_buffer" pledge since it's still used for a handful of things.
2021-01-15Everywhere: Pledge "sendfd" in WindowServer client programsAndreas Kling
This is needed for the new way we transfer window backing stores.
2021-01-12Games: Move to Userland/Games/Andreas Kling